'How to create a simple POC for an api's request and response? [closed]
I am new to android and java.I need a basic proof of concept of a working api.so that we can measure time to get http response after a request
Solution 1:[1]
Instead of giving you a programatical answer , I can give you some pointers that can help you to code.
You need to develop following parts to accomplish your requirement.
- A small SpringBoot application
- A REST controller in the SpringBoot application. 3 An HTTP GET method in your REST controller.
- The GET method should calculate the execution time using Java Instant class(only available from Java 8).
- The GET method should return the execution time.
- A RestTemplate based client application to call above REST API and print the time elapsed.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jibit George |
