Hi Everyone,

Here I'm trying this API https://ocr.space/OCRAPI#postman in post API Request in outsystems.

I consumed and it is working fine when I send an image URL in GET request.

But when I use base64 String as JSON request it is not working.

In postman, They mentioned that they are sending this base64 string in the body as form data,


So how can I send this request in the body as form data in outsystems.

Hi,

It is not a good practice to send inputs in the body of a GET requests

Yes, you can send a request body with GET but it should not have any meaning. If you give it meaning by parsing it on the server and changing your response based on its contents, then you are ignoring this recommendation in the HTTP/1.1 spec, section 4.3.

The Receive in property on the API method can be used to describe where the input parameters are received by the consumed API.

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Extensibility_and_Integration/REST_APIs/Exposed_REST_API/Input_Parameter_(REST_API_Method)

Regards,

Daniel

Daniël Kuhlmann wrote:

Hi,

It is not a good practice to send inputs in the body of a GET requests

Yes, you can send a request body with GET but it should not have any meaning. If you give it meaning by parsing it on the server and changing your response based on its contents, then you are ignoring this recommendation in the HTTP/1.1 spec, section 4.3.

The Receive in property on the API method can be used to describe where the input parameters are received by the consumed API.

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Extensibility_and_Integration/REST_APIs/Exposed_REST_API/Input_Parameter_(REST_API_Method)

Regards,

Daniel

Thanks for your reply Daniel, 

I have sent via URL in GET requests That's not a problem.

Actually I want to send in the body with POST requests.


My Problem is I could not send the base64 string in body content of POST request with the above API mentioned.