parent
85d55d6e13
commit
9762ba1f75
4
curl.md
4
curl.md
|
@ -30,6 +30,7 @@ updated: 2020-03-09
|
||||||
```bash
|
```bash
|
||||||
-X POST # --request
|
-X POST # --request
|
||||||
-L # follow link if page redirects
|
-L # follow link if page redirects
|
||||||
|
-F # --form: HTTP POST data for multipart/form-data
|
||||||
```
|
```
|
||||||
|
|
||||||
### Data
|
### Data
|
||||||
|
@ -79,6 +80,9 @@ curl -u user:pass -d status="Hello" http://twitter.com/statuses/update.xml
|
||||||
```bash
|
```bash
|
||||||
# multipart file upload
|
# multipart file upload
|
||||||
curl -v -include --form key1=value1 --form upload=@localfilename URL
|
curl -v -include --form key1=value1 --form upload=@localfilename URL
|
||||||
|
|
||||||
|
# multipart form: send data from text field and upload file
|
||||||
|
curl -F person=anonymous -F secret=@file.txt http://example.com/submit.cgi
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
Loading…
Reference in New Issue