Page 1 of 1
POST Method Issue!!!
Posted: Fri Jun 23, 2017 12:41 pm
by vinsanbu
Hi,
We tried to call our WebService using POST method. But we cant able to POST the data. Please find below my code and help me on this
put "test=success" into testdata
post testdata to URL "<MyURL>"
put it into tFormResults
We did not get any error. The above code executing without any issue. But we did not get the data in the Webservice. We are using Livecode Community Edition. Also this is Windows Application.
Regards,
Anbu
Re: POST Method Issue!!!
Posted: Fri Jun 23, 2017 12:50 pm
by LiveCode_Panos
Hi vinsanbu,
This code snippet looks fine, but we need more info to find out why you are getting this result:
1. What is the value of <MyURL>?
2. From your description, I assume the "it" variable is empty. What is the value of "the result" function?
put "test=success" into testdata
post testdata to URL "<MyURL>"
put the result into tResult
put it into tFormResults
3. Do you see that problem on the Windows IDE, or in a Windows standalone?
Best,
Panos
--
Re: POST Method Issue!!!
Posted: Fri Jun 23, 2017 3:16 pm
by vinsanbu
Hi Panos,
Thanks for your reply. Please find the attached document for the your reference.
I have tried with your code. Its through the error message (its attached in the file).
Regards,
Anbuselvan
Re: POST Method Issue!!!
Posted: Fri Jun 23, 2017 3:40 pm
by SparkOut
Might be resolution of "localhost" - what if you use 127.0.0.1 inplace?
Re: POST Method Issue!!!
Posted: Fri Jun 23, 2017 3:54 pm
by vinsanbu
I have tried with my IP address. Still same issue. I have doubt in formate the data to POST. Is there anything else?
Re: POST Method Issue!!!
Posted: Fri Jun 23, 2017 4:19 pm
by LiveCode_Panos
Ah you probably have to urlEncode testdata first:
put "test=success" into testdata
put urlEncode(testdata) into tEncoded
post tEncoded to URL "<MyURL>"
put the result into tResult
put it into tFormResults
Does it now work?
Re: POST Method Issue!!!
Posted: Thu Jun 29, 2017 3:02 pm
by vinsanbu
Hi,
Thanks for you reply..
Still we have same issue.. Actually we are calling the WebApi. Can you please confirm it might be any issue? else do we need to change the code to call WebAPI?
Thanks
Anbu