How does POSTMAN encode application/x-www-form-urlencoded data?

Hi,

I’m working on a PHP project where I need to send data to a web server
where the content type is application/x-www-form-urlencoded. I tried
applying the function urlencode() on a list of key=value pairs separated
by a &, but the data is not properly decoded in the webserver.
When I use POSTMAN to send application/x-www-form-urlencoded data it
is decoded properly. What is the proper way to encode the data?

I would recommend comparing the RAW HTTP message generated by Postman with what you are sending from PHP.

Most servers if configured will be able to log the body of the incoming request.