
package com.example.demo.client;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import java.util.Map;
@Component
@FeignClient(name = "httpBinClient",
url = "https://httpbin.org")
public interface HttpBinClient {
@GetMapping(path = "/delay/{delayInSeconds}",
produces = MediaType.APPLICATION_JSON_VALUE)
Map<String, Object> getBinWithDelayInSeconds(@PathVariable int delayInSeconds);
}