Please explain the the procedure and how do make a call apigee can feign interface. Thanks and Advance
not clear. Are you talking about this Feign ? What is it that you want to do? Please elaborate. Provide more than 8 words. We'll try to help if we can. Let's not make it a guessing game, or a game of 20 questions. Just tell us everything you can. More information is better.
Yes Dino, I Am taking about Feign. Using Feign how do we call Apigee?@Dino
This seems to be more a question about Feign than about Apigee. Apigee provides the APIs, where Feign calls APIs. Let's look at the example on the Feign website:
interface GitHub { @RequestLine("GET /repos/{owner}/{repo}/contributors") List<Contributor> contributors(@Param("owner") String owner, @Param("repo") String repo); }
This expresses the verb (GET) and the path (/repos/{owner}/{repo}/contributors) which define the endpoint, and the response types expected. You would simply adapt this to your API interface, whatever that is.
Later, you need to define the actual host:
public static void main(String... args) { GitHub github = Feign.builder() .decoder(new GsonDecoder()) .target(GitHub.class, "https://api.github.com"); }
This describes the host, and the mechanism for decoding the response type.
Obviously you would need to change the host to your host, say "https://your-org-test.apigee.net", and make sure you have defined a deserializable object.
There should be nothing special about using Apigee with Feign as there would be with using any other API calling framework.
Good luck!
User | Count |
---|---|
7 | |
2 | |
2 | |
1 | |
1 |