Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rest Server or API to test my Restful client?

Tags:

rest

android

web

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.

like image 211
Madi D. Avatar asked May 02 '12 10:05

Madi D.


People also ask

How do you test REST clients?

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.

Which is the client you use to test RESTful web services?

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.

What is difference between REST API and RESTful API?

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.

What is the best way to test REST API?

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.


2 Answers

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/

like image 120
Stan Prokop Avatar answered Sep 29 '22 21:09

Stan Prokop


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.

like image 29
Amokrane Chentir Avatar answered Sep 29 '22 23:09

Amokrane Chentir