I encountered some problems when using post

Hello, I encountered some problems when calling post through the network client. After clicking submit, the interface did not get my fields, which caused the interface to report an error. I feel that there seems to be no problem with my code. Please help me, thank you.


image

The demo code for this code is:

curl -i -k -X POST 'https://wwface.market.alicloudapi.com/face/selfie_idnumber'  -H 'Authorization:APPCODE 你自己的AppCode' --data 'name=%E6%9F%90%E6%9F%90%E6%9F%90&id=445122********33&image_url=image_url&image=image'

I really don't know how to write the call, can anyone help me?

If successful, it will return something like:

Web API testing can be successful

like what?
And you did not answer my last 2 questions.

This might help

Taifun

If successful, it will return something like:

{
    "status": "OK",
    "request_id": "TID78792d84bebb44e794a3aeea1b9ff750",
    "score": "66",  //比对分数
    "result_code": 1001,  核验结果:1001:为同一人。 1002:不能确定为同一人。 1003:为不同人
    "result_message": "系统判断为同一人"
}

The php demo file code is:

<?php
    $host = "https://wwface.market.alicloudapi.com";
    $path = "/face/selfie_idnumber";
    $method = "POST";
    $appcode = "你自己的AppCode";
    $headers = array();
    array_push($headers, "Authorization:APPCODE " . $appcode);
    //根据API的要求,定义相对应的Content-Type
    array_push($headers, "Content-Type".":"."application/x-www-form-urlencoded; charset=UTF-8");
    $querys = "";
    $bodys = "name=%E6%9F%90%E6%9F%90%E6%9F%90&id=445122********33&image_url=image_url&image=image";
    $url = $host . $path;

    $curl = curl_init();
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($curl, CURLOPT_FAILONERROR, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_HEADER, true);
    if (1 == strpos("$".$host, "https://"))
    {
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    }
    curl_setopt($curl, CURLOPT_POSTFIELDS, $bodys);
    var_dump(curl_exec($curl));
?>

The request seems to be OK, but I can't get the parameters. I don't know if there is something wrong with my code block.

有个网络客户端.获得文本事件,里面有个返回文本。你把他显示在一个标签上看看是什么内容

我用了获得文本这个代码块,是直接返回空的

把响应内容显示在标签上看是什么内容

它返回400

The API documentation states that the 400 code indicates a parameter error.

说了半天 就不能把那个返回内容截图发上来吗

把获得文本事件中的你的代码全部删除 只保留一句
设标签1.文本为 响应内容