epargne-banque.com |
|||||
|
Main / Casino / Curl post file Curl post file
CURL is a great tool for making requests to servers; especially, I feel it is great to use for testing APIs. To upload files with CURL, many people. This causes curl to POST data using the Content-Type multipart/form-data according to RFC This enables uploading of binary files etc. You can post a json file with curl like so: curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION. so for example: curl -X POST -H . According to the last section of -d in man curl: If you start the data with the letter @ , the rest should be a file name to read the data from, or - if. One more great usage of cUrl for command line is POSTing form data POSTing a file with cURL is slightly different in that you need to add an. POST is the HTTP method that was invented to send data to a receiving web Use --data-binary if you want curl to read and use the given file in binary exactly. It is an HTTP POST request sent with the request body specially formatted as a curl -F person=anonymous -F [email protected] epargne-banque.com You can upload data using one of these protocols: FILE, FTP, FTPS, HTTP, ways to upload data to a server and curl offers easy command-line options to do it. File upload POST with curl. Extracted from this excellent curl tutorial. Back in late they defined an additional way to post data over HTTP. Iterating on an api post request with curl can be frustrating if that involves a lot of command line editing. curl however can read a file for post. More:
|
||||
В© 2018 epargne-banque.com
|