Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sun Nov 19, 2017 11:13 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: How to Do an HTTP PUT Request?
PostPosted: Fri Nov 04, 2011 8:16 pm 
Offline

Joined: Fri Nov 04, 2011 8:04 pm
Posts: 2
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: How to Do an HTTP PUT Request?
PostPosted: Mon Nov 07, 2011 3:35 pm 
Offline

Joined: Fri Nov 04, 2011 8:04 pm
Posts: 2
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...


Top
 Profile  
Reply with quote  
 Post subject: Re: How to Do an HTTP PUT Request?
PostPosted: Thu Nov 10, 2011 10:49 am 
Offline

Joined: Thu Nov 10, 2011 10:46 am
Posts: 4
I haven't tried it yet but SendRequest is supposed to solve this.


Top
 Profile  
Reply with quote  
 Post subject: Re: How to Do an HTTP PUT Request?
PostPosted: Sat Feb 04, 2012 4:07 pm 
Offline
User avatar

Joined: Thu Jul 12, 2007 3:38 pm
Posts: 94
Location: Norton, Ohio
Any update on how to do a PUT with form data? SendRequest does not seem to pass on form data.

_________________
Jeremy
Real Studio Enterprise, 2012r2.1


Top
 Profile  
Reply with quote  
 Post subject: Re: How to Do an HTTP PUT Request?
PostPosted: Mon May 14, 2012 10:29 am 
Offline
User avatar

Joined: Mon Nov 29, 2010 7:01 pm
Posts: 446
I too urgently need to implement a PUT request - as in it was suppose to be done last week.

Anyone?


Top
 Profile  
Reply with quote  
 Post subject: Re: How to Do an HTTP PUT Request?
PostPosted: Tue May 15, 2012 12:07 pm 
Offline

Joined: Thu Dec 02, 2010 10:17 pm
Posts: 75
I've written a custom RESTSocket that can do PUT Requests, I'll post it on here as soon as I get a chance.


Top
 Profile  
Reply with quote  
 Post subject: Re: How to Do an HTTP PUT Request?
PostPosted: Tue May 15, 2012 1:50 pm 
Offline
User avatar

Joined: Mon Nov 29, 2010 7:01 pm
Posts: 446
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: How to Do an HTTP PUT Request?
PostPosted: Wed May 16, 2012 7:55 am 
Offline

Joined: Thu Dec 02, 2010 10:17 pm
Posts: 75
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


Top
 Profile  
Reply with quote  
 Post subject: Re: How to Do an HTTP PUT Request?
PostPosted: Sat Feb 23, 2013 8:38 pm 
Offline

Joined: Fri Feb 24, 2012 2:25 am
Posts: 46
trice, the link lands me at a 404 page not found. Is there an updated link?


Top
 Profile  
Reply with quote  
 Post subject: Re: How to Do an HTTP PUT Request?
PostPosted: Mon Feb 25, 2013 10:31 am 
Offline
User avatar

Joined: Mon Nov 29, 2010 7:01 pm
Posts: 446
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group