curl格式的http post方法的默认标题内容类型是什么? [重复]

时间:2022-11-17 01:57:08

This question already has an answer here:

这个问题在这里已有答案:

I am using a curl command with POST method using html Form with attribute- values. I am using flask framework. My content type is not application-json.

我正在使用带有属性值的html表单的POST方法的curl命令。我正在使用烧瓶框架。我的内容类型不是application-json。

The command I give with the headers is as follows:

我用标题给出的命令如下:

curl -b cookies.txt -F "description=description" -F "file_name=@curl_commands.md"  -X POST http://localhost:5000/api/v1.0/upload_doc
-H 'workflow_id:1' -H 'change_workflow:Y'

What should I specify for the Content-type:? This is required for the js ajax call.

我应该为Content-type指定什么:?这是js ajax调用所必需的。

1 个解决方案

#1


2  

The answer is clear at this url: application/x-www-form-urlencoded or multipart/form-data

这个网址的答案很清楚:application / x-www-form-urlencoded或multipart / form-data

#1


2  

The answer is clear at this url: application/x-www-form-urlencoded or multipart/form-data

这个网址的答案很清楚:application / x-www-form-urlencoded或multipart / form-data