Real Software Forums
http://forums.realsoftware.com/

How to Do an HTTP PUT Request?
http://forums.realsoftware.com/viewtopic.php?f=2&t=41321
Page 1 of 1

Author:  icouto [ Fri Nov 04, 2011 8:16 pm ]
Post subject:  How to Do an HTTP PUT Request?

HI, all. Apologies if the question is basic - I'm a newbie.

I am writing an app that will communicate to a server via a RESTful interface. I'm trying to implement the REST commands in the client, using HTTPSocket. It has been easy to setup GET and POST requests.

Although I haven't tried it yet, I am guessing that doing the DELETE request will be fairly easy, too. It looks like it will be just a matter of using HTTPSocket.SendRequest, passing "DELETE" as the method, and the URL as the string.

I am stuck, however, on how to setup the PUT request. In a RESTful interface, PUT is used to update a resource on the server - ie., when I am updating a record in the database. That means, that I am supposed to send *data* along with the request - the data for the record update. How can I attach this data to a PUT request in Real Studio? It seems that the existing HTTPSocket methods only allow me to prep and attach data to POST or GET requests?

Could someone point me in the right direction?

Author:  icouto [ Mon Nov 07, 2011 3:35 pm ]
Post subject:  Re: How to Do an HTTP PUT Request?

Apparently, this is a long-standing issue - see feedback case 8520, from 22 July 2009.

The code to make this work is already in the framework - HTTPSocket can already attach data to the body of a request. It should be relatively trivial for Real Software to implement this fix. I guess the only reason why this hasn't been done yet is a matter of priority: unless enough people 'vote' for this bug, it will not receive enough attention from RB engineers...

Author:  jbsupport [ Thu Nov 10, 2011 10:49 am ]
Post subject:  Re: How to Do an HTTP PUT Request?

I haven't tried it yet but SendRequest is supposed to solve this.

Author:  jeremy_c [ Sat Feb 04, 2012 4:07 pm ]
Post subject:  Re: How to Do an HTTP PUT Request?

Any update on how to do a PUT with form data? SendRequest does not seem to pass on form data.

Author:  neonash7777 [ Mon May 14, 2012 10:29 am ]
Post subject:  Re: How to Do an HTTP PUT Request?

I too urgently need to implement a PUT request - as in it was suppose to be done last week.

Anyone?

Author:  trice [ Tue May 15, 2012 12:07 pm ]
Post subject:  Re: How to Do an HTTP PUT Request?

I've written a custom RESTSocket that can do PUT Requests, I'll post it on here as soon as I get a chance.

Author:  neonash7777 [ Tue May 15, 2012 1:50 pm ]
Post subject:  Re: How to Do an HTTP PUT Request?

trice wrote:
I've written a custom RESTSocket that can do PUT Requests, I'll post it on here as soon as I get a chance.

Is it Secure and can it be run ASYNCHRONOUSLY?

Author:  trice [ Wed May 16, 2012 7:55 am ]
Post subject:  Re: How to Do an HTTP PUT Request?

neonash7777 wrote:
trice wrote:
I've written a custom RESTSocket that can do PUT Requests, I'll post it on here as soon as I get a chance.

Is it Secure and can it be run ASYNCHRONOUSLY?


Yes, and Yes :) It probably needs some work but it provides the basic functionality. I based it off of a class someone else created but that one was ugly and non Asynchronous. You can actually pull it from the source of another class I created at https://github.com/IAmTonyRice/RBTwilio

Author:  richmanscott [ Sat Feb 23, 2013 8:38 pm ]
Post subject:  Re: How to Do an HTTP PUT Request?

trice, the link lands me at a 404 page not found. Is there an updated link?

Author:  neonash7777 [ Mon Feb 25, 2013 10:31 am ]
Post subject:  Re: How to Do an HTTP PUT Request?

richmanscott wrote:
trice, the link lands me at a 404 page not found. Is there an updated link?


You shouldn't need this any more. RS implemented the HTTPSocket to allow any command.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/