package com.spring.infra.feign.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;

import com.spring.infra.feign.config.CommonFeignConfig;
import com.spring.infra.feign.dto.TestRequest;

@FeignClient(name = "client1", url = "${feign.clients.client1.url}", configuration = CommonFeignConfig.class)
public interface Client1FeignClient {

    @PostMapping(value = "/test", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
    String getItemById(@SpringQueryMap TestRequest request);

}
