Pycharm Use tips: Test RESTful Web Service (RESTful Interface test interface) __restful

Source: Internet
Author: User

The Pycharm Test RESTful WEB Service tool provides a RESTful interface testing interface, as shown in the following illustration, which provides HTTP methods such as GET, post,put, and the request child interface Headers,parameters, Body and so on, the Response child interface is used to display the return value, Response headers is used to display the returned message header.


Enter: tools-> Test RESTful Web Service


We use the following flask code to briefly introduce the RESTful interface Test interface:

main.py

Flask, request

app = Flask (__name__)


@app. Route ('/hello ')
Index ():
    data = Request.args.get (' Data ')
     ' Hello World: ' + data

__name__ = ' __main__ ':
    app.run ()


Test steps:

1. Run MAIN.Y

2. According to the above image input Host/port,path,parameters

3. Click on the small triangle on the left to start the test.

4. View the response and Response headers interface (see figure below)






Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.