Quantcast
Channel: Master Ruby/Rails Programming
Viewing all articles
Browse latest Browse all 25

POSTing and PUTting from cURL

$
0
0
>curl -X PUT -d "post[title]=first post from curl""http://localhost:3000/posts/1" -H "Accept: text/xml"

>curl -d "post[title]=first post from curl""http://localhost:3000/posts" -H "Accept: text/xml"

-X POST is not needed in the second command because the default is POST when -d flag is used.

Viewing all articles
Browse latest Browse all 25

Trending Articles