Forum Discussion
The images are from the response. However, you like to verify the headers, right? Please check the headers tab for the response.
- richie6 years agoCommunity Hero
Hey nmrao
Sorry I wasn't clear - I was supplying the payload response tabs to show that the Content-Length header is being represented in some weird way via the Outline and XML tabs - but it isn't listed in the RAW (which lists headers and body). - the Content-Length header IS NOT present - despite the fact that it appears to be generated in the payload in some way.
I've embedded a screenshot of the headers below - the 'Content-Length' isn't displayed - but it is displayed if I submit the same request in Postman....???
Cheers!
richie
- nmrao6 years agoChampion Level 3From your posts, content length is part of response, but does not seem to be part of headers. If that is expected in the headers, then check with your team.
- richie6 years agoCommunity Hero
I have - that's the point - both the developer and I are totally confused
The developer coded for the Content-Length to be a header - NOT appear in the body - and in fact it doesnt really appear in the body anyway - if you have a look at the RAW response - Content-Length isn't there.
If you submit the request via Postman or developers tools - the Content Length appears in the response headers as expected and required.
The fact that there is a contentLength attribute that appears to be returned in the Outline tab - but isnt selectable (you cant assert on it - or try and transfer the value using the OTB functionality, nor using groovy script) and the Content-Length ISN'T actually in the response body (see the RAW) - this proves that this is a case of ReadyAPI!'s rendering of the response skewing the response, because the response payload type is csv.
I was just hoping there would be some option (like the pretty print option in the WSDL settings) that I could alter cos all other tools we've tried (Postman etc.) display the Content-Length header in the headers - NOT the body - and to reiterate - if you actually look at the RAW payload - there isnt a contentLength attribute in the response payload at all....it's only in the XML translation of the payload does it insert a contentLength attribute in there.
The final proof is that if I don't submit the format=csv query parameter on the request - the request returns the Content-Length header in the header list. Its only when I add the format=csv (which forces the response payload to be returned in a csv format) that the Content-Length header is no longer included in the header list!
spooky!
cheers,
richie
I'll submit a tech support call with SmartBear
Related Content
- 2 years ago
Recent Discussions
- 19 hours ago
- 17 days ago