1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

PostmanからPythonのpost処理に飛ばす(formのPostman版)

Posted at

Postman側での送信内容

今回は問い合わせ内容をpostする。形式はjson形式で送信する。

{"name":"メガネ","company_name":"株式会社暴力反対","mail_adress":"@gmail.com","title":"剛田武","body_text":"やばくね"}

python側での受け取りのコード

qiita.py
@app.route('/', methods=['GET', 'POST'])
def form():
    if request.method == 'POST':
         name = request.json["name"] 
         company_name = request.json["company_name"] 
         mail_adress = request.json["mail_adress"] 
         title = request.json["title"] 
         body_text = request.json["body_text"] 

需要があるかどうかはさておき、request.jsonで出来た。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?