How to fill in the HTTP Request Activity

Dear Sir/Miss:
I’d like to OCR the image via the third-party Api(As below).I tried to use the HTTP Request acitivity to do that. but fail to get the result.

I upload the image and the workflow,who can check the reason for me ?

Image:image
Error:


flow attachment:
HTTP.zip (20.9 KB)

Only the POST method in HTTP is supported. Please set the Content-Type to application/json or application/x-www-form-urlencoded.

Cross-platform HTTP interface. Please review the HTTP interfaces for each type carefully. Only POST parameter transmission is supported.

HTTP API Documentation

1.1. Request URL

http://api.jfbym.com/api/YmServer/customApi

1.2. Parameter List

Parameter Name Value Type Description Required
image string Base64 string of the image to be recognized Yes
extra string ‘All’ (‘/Yellow’/‘Red’/‘Blue’) Yes
token string User Center Token Yes
type string 10201 Yes

@13631390123 your url is greater than 2000 chars that is causing the error. based on what you have shared you url should be http://api.jfbym.com/api/YmServer/customApi Could you share a screenshot of your HTTP Request field in advanced editor since you are using string.format

I suspect you have added your token as well in the url. Trim your url to the expected http://api.jfbym.com/api/YmServer/customApi and it should work.

Hi,

Can you try to use FormURLencoded instead of Parameters as the following. Also set " application/x-www-form-urlencoded" as Content-Type in Header?

Regards,

@muktadir


I checked the length of the URL.It is 43 chars
By the way. The HTTP.zip I uploaded have all the setting I have done.

@Yoichi
Hi Yoichi,Do u have the sample to fill The Url-encoded from data?
what shoud I fill that?Thanks.

Hi,

For now, can you try to set same dataset which is in Parameters into it?
(And remove all the dataset in Parameters)

Regards,