Option to send GET request body


#1

One of the suppliers that I work with provide an API that is used to inject transaction data. This API uses a GET request, where the transaction information is passed as JSON data within the HTTP body.

I appreciate that a GET request is not necessarily intended for this approach and is possibly why Katalon advises that the ‘GET method does not require body content’ when speciifying a GET request and clicking on HTTP body.

Postman does allow a GET request with a HTTP body; however given that I have utilised Katalon extensively for web testing, Katalon does remain my application preference, if it can be supported.

Is there a method by which this can currently be supported? If not, can I request this as an enhancement for a future release?


#2

Could you please try adding a custom HTTP GET method


#3

Hello, I tried adding a custom HTTP GET you mentioned but to no use.
It’s problematic even before adding data to HTTP body in the custom GET, the custom GET method (i will name it GET1) it’s not classified as any HTTP method from what I see, it get’s the classification CUST in Katalon and does not fit anywhere to any of the method types.
Using the method just created (GET1) on run you receive an Status: 400.
Using the predefined GET method it works fine. Status: 200.
Please advise me on how to set the method.
Note: I attached screenshots for used examples:


#5

Hello,

Any news on this[quote=“Daniel_Wilkinson, post:1, topic:17296, full:true”]
One of the suppliers that I work with provide an API that is used to inject transaction data. This API uses a GET request, where the transaction information is passed as JSON data within the HTTP body.

I appreciate that a GET request is not necessarily intended for this approach and is possibly why Katalon advises that the ‘GET method does not require body content’ when speciifying a GET request and clicking on HTTP body.

Postman does allow a GET request with a HTTP body; however given that I have utilised Katalon extensively for web testing, Katalon does remain my application preference, if it can be supported.

Is there a method by which this can currently be supported? If not, can I request this as an enhancement for a future release?
[/quote]

?

The project I work with needs a GET operation with a JSON body attached to it. I’ve tried doing the custom HTTP GET method as suggested in the comment above, but i dont understand how i can define that custom method as a GET.

I also tried creating a script and sending the request manually and doing some debugging, but it seems the body does not get attached to the GET request no matter what I try. I’ve added a debug option in the API itself to log the BODY i send to the endpoint, but in the logs it just came back empty. But for some reason the “.getBodyContent().contentLength” was reporting the correct length of the body.

It makes me think that adding a BODY to the GET method is just not possible in Katalon.

Any help would be appreciated, thanks!