Here an example of using trace with CURL
Zitat:
curl -k -i -X POST -H "accept: application/json" -H 'content-type: application/x-www-form-urlencoded'
https://api-sandbox.dhl.com/parcel/d.../ropc/v1/token -d "grant_type=password\&username=user-valid\&password=SandboxPasswort2023!\&client_id=yy yyyyyyyyyyyyy\&client_secret=xxxxxxxxx"
--trace-ascii dump.txt
You will have
dump.txt file in the same folder contain many things and here a small part you might need to look at
Code:
=> Send header, 203 bytes (0xcb)
0000: POST /parcel/de/account/auth/ropc/v1/token HTTP/1.1
0035: User-Agent: curl/7.39.0
004e: Host:
api-sandbox.dhl.com
0069: accept: application/json
0083: Content-Length: 123
0098: Content-Type: application/x-www-form-urlencoded
00c9:
=> Send data, 123 bytes (0x7b)
0000: grant_type=password\&username=user-valid\&password=SandboxPasswo
0040: rt2023!\&client_id=yyyyyyyyyyyyyyy\&client_secret=xxxxxxxxx
== Info: upload completely sent off: 123 out of 123 bytes