I have a post request with null as body. I am not sure how to pass this null through 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 successful json response. If no null in postman request, I get ‘content type error’ as response.
Gayatri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.