如何写在邮递员形式数据请求的等效原始请求?

时间:2020-04-22 20:05:43

标签: postman

我正在使用表单数据-我通过表单数据传递了2个WAV文件。我正在使用键:“ file1”,“ file2”。

使用表格数据时的烧瓶应用程序:

def compare_voices():
    if request.method == 'POST':
        file1 = request.files["file1"]
        file2 = request.files["file2"]

邮递员表单数据如下:

k

我想知道如何在邮递员中将其转换为原始格式? 喜欢

{
"file1" : "path to file1" , 
"file2": "path to file2"
}

但是它不起作用。

1 个答案:

答案 0 :(得分:1)

我看到您正在尝试比较2个WAV文件。我认为在某些时候您将需要实际的文件并执行计算。

您可以通过单击raw并指定您的主体为JSON格式来以这种格式(称为JSON)编写。

enter image description here