Hi,
I'm trying to bring Gravity Forms web API into Livecode. There is some requests, that requires to use PUT and DELETE methods.
If you do a PUT/DELETE then you ONLY get a response if there is an error(it is always empty). So is there any way to get response for PUT and DELETE like for POST and GET?
Thanks
Gurgen
PUT/DELETE methods
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 280
- Joined: Fri Jan 09, 2015 6:15 pm
Re: PUT/DELETE methods
You did not put up a code sample...so are you putting the syntax like this??
--Todd
Code: Select all
put "you URL and parameters here" into tURL
put URL tURL into tPutResults
put the result into tError
Re: PUT/DELETE methods
Thank you Todd, no my syntax isToddFabacher wrote:You did not put up a code sample...so are you putting the syntax like this??
--ToddCode: Select all
put "you URL and parameters here" into tURL put URL tURL into tPutResults put the result into tError
For PUT
Code: Select all
PUT <my data> into URL <my URL>
put the result into tError
And for DELETE
Code: Select all
DELETE URL <my URL>
put the result into tError
-
- Posts: 280
- Joined: Fri Jan 09, 2015 6:15 pm
Re: PUT/DELETE methods
A full HTTP put command would be like this.
Two things: 1. There is no "success" response in LiveCode that I am aware of and 2. You should test this in Android, I don't think it works.
--Todd
Code: Select all
// server must be able to process PUT
put tData into URL "[your URL]"
put the result into tError
if tError is not empty then
beep
answer "error; " & tError
end if
--Todd