读取此端点的正确方法是什么?

问题描述 投票:0回答:1

我有一个需要使用的API端点,看起来像下面的东西(这是一个POST请求),它围绕着将图像上传到服务器。

parameters:部分是否意味着应该用用户在提交表单时(单击提交时)上传的内容填充URL?例如:www.website.com/upload_identifier=398/File=abc12upload_indentifierFile是由用户驱动的,需要在URL中反映出来吗?我认为不是因为GET请求填充了URL,而不是POST请求。

我只是想知道我在潜水之前是否阅读正确。感谢您的阅读。

parameters:
- upload_identifier
- File

Response code: 200 - success
{
    "isValid": true,
    "message": "Succuesfully complete request",
}
Response code: 200 - error
{
    "isValid": false,
    "message": "Access Denied. Invalid Credentials. Contact your administrator",
    "code": "0",
    "message": "Access denied",
    "message": "Access denied",
}
Response code: 400 - error
{
    "isValid": false,
    "message": "Invalid file type" / "File too large",
    "code": "5",
    "message": "Error in expected params",
    "message": "There are missing or invalid parameters than expected"
}
Response: 400 - error
{
    "isValid": false,
    "message": "Request already processed",
    "code": "6",
    "message": "Record already exists",
    "message": "Record already exists"
}
php laravel api debugging post
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.