REST client online
: It allows to test public REST API. Sometimes our server is blacklisted ...
This tester tool allows you to test rest API online. you can easily test post request directly in your browser. You can test local or public REST API:
- The requests are launched directly from the browser to test local API (not accessible from the internet). CORS must be enabled.
- The requests are launched from our server to test public API. CORS do not need to be enabled.
You can see the user guide to help you to use this REST client.
This guide explains how to test JSON API online with this tool:
- How to call a web service:
Step 1 - Select the HTTP method
Step 2 - Fill the URL of web service to test.
Step 3 - Add a basic authentication or headers if necessary. You can also add a request body if necessary.
Step 4 - Call your web service
You can also beautify the web service response if it is XML or JSON data.
- Cross-origin resource sharing (CORS) :
Select the place of sending of the request: From browser or from server
If you want to test a custom REST API which is not public, select from browser. But CORS must be enabled.
If you want to test a public REST API which for which CORS is not enabled, select from server.
- Favorite requests:
You can save your favorite requests so that you will find it during your next visits.
If you have an account, your favorite requests are backuped in server side.
Otherwise (You do not have an account), it is a local backup in your browser, it can be deleted at any time!
Your favorite requests are displayed in "Your favorites requests" box. You can click on the request name to load your favorite request.
You must click on the "Save" button to add or update current request in favorites.
Cross-Origin Resource Sharing (CORS)
When you select "Send REST API Request from your Browser" mode, it creates HTTP requests on the client side, your browser directly launches requests, the calls are cross domain. Cross-Origin Resource Sharing (CORS) is a mechanism to let a user agent gain permission to access selected resources from a server on another domain (than extendsclass.com).
You must allow CORS in your REST API. Example for CORS in php:
If you want to know more about Cross-Origin Resource Sharing: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
Testing REST API Manually
This web service testing tool allows to test API online, you can make http request online. This tool is ideally used to discover an API by doing some tests. This can be useful for a small test of an API, for example to launch 3 or 4 requests, it does not require installation.
You can launch requests to a public REST API (CORS does not need to be disabled with calls from the server side). You can also test your local API, with requests launched directly in the browser.
It is better to use a more functional heavy client in the case of advanced tests. API testing tools do not replace test automation (for example: UI tests with selenium ... ).
About REST (Representational state transfer)
REST is a set of architectural principles which is stateless. The server does not keep the client state and vice versa: they can understand each other without seeing previous messages.
It is a alternative to SOAP (Simple Object Access Protocol), which is more heavyweight. REST is more and more used, its use has exceeded SOAP! REST is easier to implement.
There is no standard for the description format of REST services. To describe a REST webservice you can use WADL, Swagger/OpenAPI, RAML and others formats.
REST usually structures data in JSON, but it can also be XML, YAML, or any other format.
One of the benefits of REST is to be based on standard HTTP operations, like GET and DELETE, it avoids ambiguity! When you use GET you know it is to recover something. Same thing for DELETE, you doubt that it is to make a suppression.
A RESTful API Web service uses both HTTP and REST, it includes:
- A base URI for the API
- Internet Media Types Used by the REST API (such as JSON or XML)
- HTTP operations such as GET, PUT, POST, PATCH or DELETE. They describe actions that can be applied to resources.
REST asks developers to use HTTP methods explicitly :
- GET: To retrieve a resource
- PUT: To add or update a resource
- PATCH: To partially update a resource
- DELETE: To delete a resource
- POST: Everything else
Facebook, Google, Twitter ... provide REST APIs. You can find many useful APIs for developers.