如何在postman中设置嵌套字段

flvtvl50  于 2023-08-05  发布在  Postman
关注(0)|答案(1)|浏览(194)

我在使用Postman测试我的RESTful API时遇到了一些问题。它有嵌套字段“截图”,我不知道如何在Postman表单数据中正确设置它。我应该使用预请求脚本或 Postman 有内置的功能,这样做,直接在表单数据字段?- 谢谢-谢谢
请求数据结构:

data = {
    'title': 'Film123',
    'poster_image': 'base64string',
    'content_rating': 'NC-17',
    'genres': [1, 2, 3], 
    'actors': [1, 2, 3], 
    'country': 'USA', 
    'release_date': '2022-03-14', 
    'director': 'test director', 
    'description': 'Test description', 
    'studio': 'Test studio',
    'screenshots': [
        {
            "image": 'base64string',
        },
        {
            "image": 'base64string',
        },  
    ]
}

字符串

nr7wwzry

nr7wwzry1#

我的建议是将请求体更改为raw > json,并在必要时使用环境变量。

相关问题