Take the 2-minute tour ×

I don't understand the difference between

a) on the server side initiating a cURL connection and transmit POST information to http://somesite.com/action and receiving XML data


b) using cURL to access RESTful web services

Are a) and b) the same thing? Are they synonymous?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

I'm not sure I understand the significance of "on the server side", please elaborate if there is any. Otherwise:

Accessing a RESTful web service consists of accessing an URL via HTTP, so b, is really a subset of a.

When done right, the client usually needs to issue multiple GET request to "drill down" to the specific resource it intends to work with. Then it may cache the specific URL, but hard-coding it or constructing it on the client side is not considered elegant.

share|improve this answer
add comment

The only difference is whether the action invoked by the URL is a RESTful service. If the action depends on storing or retrieving state from a cookie or hidden field, then it isn't really RESTful. I don't know if this makes a difference to you, in your case it probably only determines the kind of error response you get back. RESTful services also have conventions regarding how they behave when they receive a GET or PUT instead of a POST, which may matter if you're trying to interact with a system instead of just interrogate it for some data.

share|improve this answer
add comment

Your Answer


