Curl: Difference between revisions
From Leo's Notes
This page was last edited on 24 August 2023, at 21:46.
Created page with " == Quick Usage == === POST data === {{highlight|lang=terminal|code= ## A Post request $ curl --data "" https://api.leo.leung.xyz/recent $ curl -X POST https://api.leo.leung..." |
mNo edit summary |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
== Quick | == Quick usage == | ||
=== POST data === | === POST data === | ||
| Line 17: | Line 17: | ||
}} | }} | ||
=== | === Pass custom headers === | ||
{{highlight|lang=terminal|code= | {{highlight|lang=terminal|code= | ||
| Line 23: | Line 23: | ||
}} | }} | ||
[[Category:Linux]] | == See also == | ||
* pcopy - A cool tool written in go that lets you upload/download data from a shared 'clipboard'/paste bin like service | |||
{{Navbox Linux}}[[Category:Linux]] | |||
[[Category:LinuxUtilities]] | |||
Latest revision as of 21:46, 24 August 2023
Quick usage
POST data
## A Post request
$ curl --data "" https://api.leo.leung.xyz/recent
$ curl -X POST https://api.leo.leung.xyz/recent
$ curl --request POST https://api.leo.leung.xyz/recent
## Post data
$ curl --data "client_id=75&secret=xyz" https://api.leo.leung.xyz/recent
## Multipart data
$ curl --form "client_id=75&secret=xyz&file=@filename.txt" https://api.leo.leung.xyz/recent
Pass custom headers
$ curl -H "Custom-Header: True" https://api.leo.leung.xyz/recent
See also
- pcopy - A cool tool written in go that lets you upload/download data from a shared 'clipboard'/paste bin like service