I have a POST request with null
as the body. I am not sure how to pass this null
through a Playwright POST request.
I tried with data: null
, data: 'null'
, data: Null
, data: '%00'
, data: {}
. All these fails the test at the line where I catch the response body as await resp.body()
.
If I pass null
in Postman for the same request, I get a successful JSON response. If no null in the Postman request, I get ‘content type error’ as response.