42
Views
4
Comments
Solved
What is the Default Value of Request Format when Consuming REST API?
Application Type
Traditional Web, Mobile, Reactive, Service

hi there, 

I am wondering the default value of this request format when consuming a rest api:


regards and thanks

2024-08-22 11-39-17
Pedro Sousa
Solution

Hello @ibox ,

I believe it doesn't throw an error because you don't have any input in your API. So it doesn't really matter...

If you add an input to your API and Receive In = Body the Request Format will matter and it will throw an error if not defined.


Regards,

Pedro.

2023-11-20 06-53-17
Neha Rathore
Solution

Hi ibox,

Request format is the Content format of the body request. Mandatory for POST, PUT and PATCH HTTP methods. 
The possible values are:
JSON: for JSON content;
Form URL Encoded; for URL-encoded form data;
Binary: for binary content;
Text/plain: for other content like, for example, XML. 

You can even check this View request examples.


Hope this helps


Thanks
Neha

2023-11-20 06-53-17
Neha Rathore

May I know the reason for down vote please. @ibox it was not helpful ?

2025-01-09 14-56-57
IQ78

Hi, thanks

It was helpful. Not me to down vote that answer, may be someone who disagree with your answer. 

Although i am still wondering why i try Post with Post Method and it is still okay when published:

regards

2024-08-22 11-39-17
Pedro Sousa
Solution

Hello @ibox ,

I believe it doesn't throw an error because you don't have any input in your API. So it doesn't really matter...

If you add an input to your API and Receive In = Body the Request Format will matter and it will throw an error if not defined.


Regards,

Pedro.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.