Skip to content

Curl

What's curl used for? curl is used in command lines or scripts to transfer data. curl is also used in cars, television sets, routers, printers, audio equipment, mobile phones, tablets, settop boxes, media players and is the Internet transfer engine for thousands of software applications in over ten billion installations. https://curl.se/

Request


curl -v -X OPTIONS $URL
|->
< HTTP/1.1 200 OK
< Allow: PROPFIND, DELETE, MKCOL, PUT, MOVE, COPY, PROPPATCH, LOCK, UNLOCK
< Allow: OPTIONS, GET, HEAD, POST
< Content-Length: 0
< Date: Thu, 21 Dec 2017 00:32:04 GMT
< Server: lighttpd/1.4.28

in the response we can see that list of Allowed method is quite long "PROPFIND, DELETE, MKCOL, PUT, MOVE, COPY, PROPPATCH, LOCK, UNLOCK" What we can do ?

Upload file


curl --upload-file  php-echo.txt -v --url http://192.168.0.105/php-echo.php -0 --http1.0

Remove file


curl -i -X DELETE 192.168.0.102/php-echo.php