Quantcast

RESTful API -problem with curl command

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RESTful API -problem with curl command

srivastava.ishita01
Hi all!

I am trying to make a RESTful API using cherrypy. For the POST method ,this is written on the tutorial's  page:

where am I supposed to type this curl command?Am I supposed to type this in the python script?or the command prompt?


Send a POST HTTP request to 127.0.0.1:8080/api/songs/ with cURL:

curl -d title='Frozen' -d artist='Madonna' -X POST '127.0.0.1:8080/api/songs/'

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RESTful API -problem with curl command

Pieter Malan
In the terminal.

On Thursday, July 21, 2016 at 11:29:49 AM UTC+2, [hidden email] wrote:
Hi all!

I am trying to make a RESTful API using cherrypy. For the POST method ,this is written on the tutorial's  page:

where am I supposed to type this curl command?Am I supposed to type this in the python script?or the command prompt?


Send a POST HTTP request to <a href="http://127.0.0.1:8080/api/songs/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A8080%2Fapi%2Fsongs%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHCOz9XBYYfIdq2oRrWOx7pBp4nSw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A8080%2Fapi%2Fsongs%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHCOz9XBYYfIdq2oRrWOx7pBp4nSw&#39;;return true;">127.0.0.1:8080/api/songs/ with cURL:

curl -d title='Frozen' -d artist='Madonna' -X POST '<a href="http://127.0.0.1:8080/api/songs/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A8080%2Fapi%2Fsongs%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHCOz9XBYYfIdq2oRrWOx7pBp4nSw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A8080%2Fapi%2Fsongs%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHCOz9XBYYfIdq2oRrWOx7pBp4nSw&#39;;return true;">127.0.0.1:8080/api/songs/'

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RESTful API -problem with curl command

Michiel Overtoom
In reply to this post by srivastava.ishita01
Hi,

> On 2016-07-21, at 11:29, [hidden email] wrote:
>
> where am I supposed to type this curl command?Am I supposed to type this in the python script?or the command prompt?

On the command prompt. Of course, it assumes that you have curl installed.

Greetings,


--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Loading...