Communicate with server using PUT

Ben Rubinstein benr_mc at cogapp.com
Thu Jun 27 11:04:47 EDT 2013


On 27/06/2013 14:28, Mike Bonner wrote:
> I think a put and a post are very similar. You might manually set the
> headers to work as a put but us post to send the data. (think the data
> comes through the same way, its just the headers that differ)

I don't think that's needed - LiveCode's PUT mechanism works fine.

The difference in the headers _is_ the difference: the point of the spec is 
that "PUT" means something different to "POST" (in POST, the resource 
specified in the URL is supposed to handle the data, process it in some way, 
possibly return some result - so for example, if that resource doesn't exist, 
that's an error; in PUT, the URL specifies where the data should go - if 
there's nothing there now, that's fine.  PUT is the inverse of GET.  POST is 
something different altogether.)  But of course anyone can implement a server 
to interpret requests in any way.

(Whether the data is encoded the way that the service expects is another issue 
- ie the way that LibURL is defaulting to encoding it.  But that should be 
defined by the service.)

Ben






More information about the use-livecode mailing list