Convert Postman call into normal API call

399 views Asked by At

I'm currently making use of an API from Free OCR API (using the POST call). I've tried it using Postman, and it seems to work fine. But when I use it through Outsystems, I get an Internal server error. The requests created by both services are pretty much the same, but it doesn't work through anything other than Postman.

Here are the Request call made:

Postman call:

POST /parse/image HTTP/1.1
Host: api.ocr.space
Cache-Control: no-cache
Postman-Token: 3e58eea7-4108-dd26-e79b-1183ee6e5908
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="apikey"

404f8bdbfe88957
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="language"

eng
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="base64image"

data:image/bmp;base64,<base64 text>
------WebKitFormBoundary7MA4YWxkTrZu0gW--

Outsystems call:

POST /parse/image HTTP/1.1
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu088
Cache-Control: no-cache
Host: api.ocr.space
User-Agent: OutSystemsPlatform

------WebKitFormBoundary7MA4YWxkTrZu088
Content-Disposition: form-data; name="apikey"

404f8bdbfe88957
------WebKitFormBoundary7MA4YWxkTrZu088
Content-Disposition: form-data; name="language"

eng
------WebKitFormBoundary7MA4YWxkTrZu088
Content-Disposition: form-data; name="base64image"

data:image/bmp;base64,<base64 text>
------WebKitFormBoundary7MA4YWxkTrZu088--

Does Postman do anything additional that I'm missing?

0

There are 0 answers