I am creating an Android app that requires me to do a rest request to a server, get some data and analyze them.
I am still new to android development so i am not sure if i am implementing the requests and threading right, and the server is not ready yet. So i need a public rest server that i can use to test sending requests? It doesn't matter what data i receive.
Thanks in advance.
Step 1) Create a HTTP client and method to send HTTP GET request to any server endpoint. Step 2) Start a Restito server to listen and capture the requests sent to the endpoint 'getevents' in localhost http://localhost:9092/getevents . Step 3) Create a test class to test the above client.
REST-assured is a popular Open-Source REST Client for testing API in Java. For Java developers, it's a preferred way to test REST services easily and automatically.
Put simply, there are no differences between REST and RESTful as far as APIs are concerned. REST is the set of constraints. RESTful refers to an API adhering to those constraints. It can be used in web services, applications, and software.
If you are not a big fan of command-line tools and rather like a GUI client to test your REST API then Postman is the best tool for you. It comes as a Chrome extension and you can install it on your chrome browser and from thereon. It is probably the most popular tool to test your REST API.
There is a testing web called httpbin, it's used by requests python library (same author).
Testing an HTTP Library can become difficult sometimes. PostBin.org is fantastic for testing POST requests, but not much else. This exists to cover all kinds of HTTP scenarios. Additional endpoints are being considered (e.g. /deflate).
http://httpbin.org/
You can test against any public REST API that you can find from famous services and choose actions that don't require an authentication. For instance Tiny Url (if you want to test GET requests) and if you want more complex data you can get an auth token from Twitter and test against their API.
Note that this is just an example. The idea is to investigate the APIs of your favorite sites/servies and you'll likely find one that fits you and your tests.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With