curl
can show the raw request header and body with--trace
option*1. There is no way to get the content of the request withInvoke-WebRequest
.curl
can show the body of 5xx response.Invoke-WebRequest
returns null when a server responds with status 4xx or 5xx, so you cannot view the body of the response.curl
shows the content of the302 Found
response when a server redirects the request.Invoke-WebRequest
only shows the content of the200
response in the same situation.