Python-flask Foundation

Source: Internet
Author: User

Get Request:

Usage Scenario: If you only get data for the server and do not have any impact on the server, then use a GET request at this time .

parameter:The Get request is placed in the URL , and is passed '? ' To specify key and value in the form of the

Post Request:

Usage Scenario: If you want to have an impact on the server, use the post request

Reference:the post request parameter is not placed in the URL , it is sent to the server via ' form data '

Get and post requests get parameters:

Get requests are obtained through ' Flask.request.args '

The POST request is obtained by ' Flask.request.form '

hook function (hook):

Befor_request:

    1. Executed before the request
    2. is performed before the view function.
    3. is an adorner that can put the code that needs to be set as a hook function before the view function executes

Python-flask Foundation

Related Article

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.