rest assured not reading body if content type is json and response body contains only "Response only this string"

144 views
Skip to first unread message

onkarmurthy nulennavar

unread,
Apr 21, 2021, 3:33:46 PM4/21/21
to REST assured
rest assured not reading body if response content type is json and response body contains only "Response only this string"

sij...@gmail.com

unread,
Apr 21, 2021, 7:02:48 PM4/21/21
to REST assured
Could you elaborate this some more with some examples?

onkarmurthy nulennavar

unread,
Apr 22, 2021, 3:37:17 AM4/22/21
to REST assured

Request method: POST

Request URI:<url for post>

Proxy: <none>

Request params: <none>

Query params: region=USA

Form params: <none>

Path params: <none>

Headers: accept=*/*

Content-Type=application/json; charset=UTF-8

Cookies: <none>

Multiparts: <none>

Body:

{

    "seq": "1",

    "userid": "4",

    "hmac": "hmac"

}


Response:


Response Status => 200
Response Content Type => application/json;charset=UTF-8
Response Body =>blank or empty



where as


POSTMAN:



connection →keep-alive
content-length →5
content-type →application/json;charset=UTF-8
date →Wed, 21 Apr 2021 17:30:54 GMT

response:

20000

onkarmurthy nulennavar

unread,
Apr 22, 2021, 3:37:22 AM4/22/21
to rest-a...@googlegroups.com


Hi Here is the details of request


Request method: POST

Request URI: <url>

Proxy: <none>

Request params: <none>

Query params: region=USA

Form params: <none>

Path params: <none>

Headers: accept=*/*

Content-Type=application/json; charset=UTF-8

Cookies: <none>

Multiparts: <none>

Body:

{

    "seq": "1",

    "userid": "4",

    "hmac": "abc"

}


Response from rest assured:


<Blank>



Post man:


connection →keep-alive
content-length →5
content-type →application/json;charset=UTF-8
date →Wed, 21 Apr 2021 17:30:54 GMT
response body:
20000

--
You received this message because you are subscribed to a topic in the Google Groups "REST assured" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rest-assured/3G5sIJ9O_3A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rest-assured...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rest-assured/87ba5b9e-97ab-4861-8336-877a97631cfen%40googlegroups.com.

onkarmurthy nulennavar

unread,
Apr 22, 2021, 3:37:30 AM4/22/21
to REST assured
On Thursday, April 22, 2021 at 4:32:48 AM UTC+5:30 sij...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages