2

i m performing one POST request where i dont need "Content-Length" in headers as it is automatically assigned. And i have used "configure charset = null" in the code, still it is passing " Content-Length: 70" in the header.

please let me know how to remove "Content-Length" from header ?

thanks

asif anwar
  • 77
  • 1
  • 7

1 Answers1

1

You can't. I know, you probably want to do a negative-test or something - but there is probably very little value in such a test. If you really want to do this, use a Java library for this particular scenario.

EDIT - or use cURL from Karate: Is possible to execute curl in Karate tests?

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248