Sign in New API Help About

Posting to the dpaste.com API with curl

368 bytes of Bash
Created 3 years, 9 months ago by dpaste.com — public
Viewed 3,888 times
https://dpaste.com/FZNXRMS75
COPY TO CLIPBOARD SOFT WRAP RAW TEXT DUPLICATE DIFF
# Note: The curl field spec -F "content=<-" captures stdin to the 'content' field.

# Basic plain-text item creation
curl -s -F "content=<-" https://dpaste.com/api/v2/

# Set syntax to Javascript
curl -s -F "syntax=js" -F "content=<-" https://dpaste.com/api/v2/

# Set expiry (1–365 days)
curl -s -F "expiry_days=10" -F "content=<-" https://dpaste.com/api/v2/

Related items


Share: