Usage Tips:
- Click on a keyword to enable inline editing.
- Click inside a code block to copy (excludes comments).
- Use the button to view examples.
- Click outside to collapse all examples.
Advance curl
# POST url-encoded data
curl --data-urlencode '<QUERY_STRING>' <TARGET>
Sample Output:
TO-DO
# Put the POST data to url and use GET
curl -G --data-urlencode '<QUERY_STRING>' <TARGET>
Sample Output:
TO-DO
# PUT a file
curl -X PUT <TARGET>/<FILE> -d @<FILE>
Sample Output:
TO-DO
# PUT a file (with creds)
curl -X PUT -u '<USER>:<PASSWORD>' <TARGET>/<FILE> -d @<FILE>
Sample Output:
TO-DO
# Put a file as raw binary format (preserve newlines and control characters)
curl -X PUT <TARGET>/<FILE> --data-binary @<FILE>
Sample Output:
TO-DO
# POST a file with form param 'file'
curl -X POST -F 'file=@<FILE>;type=<APPLICATION_TYPE>;filename=<FILE>' <TARGET>
Sample Output:
TO-DO
# POST a file in raw-text format (not as attachment) with form param 'file'
curl -X POST -F 'file=<<FILE>' <TARGET>
Sample Output:
TO-DO
# Not to handle sequences of '/../' or '/./' in the given URL
curl --path-as-is --ignore-content-length '<TARGET>/../../../..<FILE_PATH>'
Sample Output:
TO-DO
# Save the same name as the file on the server
curl <TARGET>/<FILE> -O
Sample Output:
TO-DO