Using the dpaste.com API with curl
368 bytes of
Bash
Created 1 year, 5 months ago
by
dpaste.com
https://dpaste.com/FZNXRMS75
| # 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/
|
# 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/