Previously in the development of WebService services, are their own based on the HTTP protocol, write a test program to test, recently in the study of restful, the previous WebService service was reconstructed, summed up a lot of experience, today to introduce you to the next several rest The test tool for the client.
Rest Introduction
The so-called rest, is representational state Transfer, the Chinese translation of this word is very not uniform, and very obscure, there is called "representational state Transmission", there is called "representation of the transition", and so on.
RESTful Web services provide resource links through a simple and clear URI that the client obtains by sending HTTP requests to the URI, while the process of acquiring and processing the resources changes the state of the client application (unlike those remote procedure calls that change directly).
The four HTTP methods used to make crud (Create, Read, Update, and delete) resources are post, GET, PUT, delete, respectively.
Browser-based REST client tools
There are a lot of plugins in Chrome or Firefox, I usually use chrome, and I can search for the plugin I want in Chrome's webstore. Here you can talk about Advance rest client, postman-rest client, DEV HTTP client, simple REST client, restclient plugin under Firefox.
Advanced REST Client
Web Developer Helper Program to create and test custom HTTP requests. It is a very powerful, easy-to-use client-side test tool that has been well received by programmers. This app is used by developers over 50k per week. So many people are not wrong!
Supported Features
- Make a HTTP request (via XMLHttpRequest level 2)
- Debug socket (via web socket API).
- JSON Response Viewer
- XML Response Viewer
- Set custom Headers-even does not supported by XMLHttpRequest object
- Help with filling HTTP headers (hint + code completion)
- Add headers list as raw data or via form
- Construct POST or PUT body via raw input, form or send file (s) with request
- Set Custom form encoding
- Remember latest request (save current form, state, and restore on load)
- Save (Ctrl+s) and open (Ctrl+o) saved request forms
- History support
- Data Import/export
Postman-rest Client
Postman can help you work more effectively against the API. Postman is a Scratch-your-own-itch project. What it needs is for developers to effectively create APIs in the project and to preserve the API tests.
Support Features
- HTTP Requests Support File upload
- JSON and XML for formatting API responses
- Open the responses HTML file in a new window to show
- Support for the rest criteria for hypermedia application state engine-Hateos
- Image Preview
- Request history
- Basic OAuth 1.0 Helper
- Autocomplete for URL and header values
- You can add a parameter or header value using Key/value edit in the URL parameter
- Use environment variables to easily transfer between settings. Can be used for testing, production, staging or local setup.
- The value of using global variables is in the entire APIs
- Use the Quick Find feature to preview variables and their value usage
- Keyboard shortcuts to maximize your productivity
Simple REST Client
Simple REST Client Plug-in provides a single form for various HTTP operations and can see the returned information. Build custom HTTP requests to test your network services directly.
The restclient under Firefox
Firefox restclient plugin, this plugin is developed by the Chinese, the function of supporting basic and OAuth login header sent, and for the returned XML data can also be highlighted
Linux Common Tool Curl
Curl is a powerful file transfer tool that supports a variety of protocols, and it's a piece of cake to test restful Web services.
Curl has a number of command parameters that are typically used for restful WEB services tests using the following four parameters:
- -d/–data:post Data Content
- -x/–request: Specifies the requested method (automatically set to post when using-D)
- -h/–header: Set Header information
- -i/–head: Displays only the HTTP header information returned
Java GUI rest-client
This is a test gadget written in Java, and the project home page mentions that it has two versions of command line and GUI. For the convenience of operation we chose GUI version to look at. Since it's a piece of software, it's obviously more powerful than the browser plugin you just introduced. It supports the JSON and XML indentation and highlighting of the reply body, as well as the ability to set up a restful server with one click, plus the functionality of unit testing.
Formatting JSON data
REST client browser-based testing tools