| View previous topic :: View next topic |
| Author |
Message |
Filipe_Br Master Cheater
Reputation: 3
Joined: 07 Jan 2016 Posts: 272 Location: My house
|
Posted: Sat Sep 15, 2018 6:20 am Post subject: Internet Class - How to use postURL |
|
|
To pass some parameter using getURL and get the result I look like this:
| Code: | | returndata = int:getURL("http://myhost/?p=foo") |
But I want to use the postURL, but it is not working:
| Code: | | returndata = int:getURL("http://myhost/", "p=foo") |
How do I use postURL? _________________
... |
|
| Back to top |
|
 |
FreeER Grandmaster Cheater Supreme
Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Sat Sep 15, 2018 8:34 am Post subject: |
|
|
you still have getUrl....not postUrl
(all I know is)
| Code: | Internet class (Object)
global functions
getInternet(string) - Returns an internet class object. The string provided will be the name of the client provided
properties
Header : string - the additional header to be sent with the next getURL request
methods
getURL(path) - returns a string containing the contents of the url. nil on failure
postURL(path, urlencodeddata) - posts the given data to the path and returns the results
|
copy pasted from celua.txt _________________
|
|
| Back to top |
|
 |
Filipe_Br Master Cheater
Reputation: 3
Joined: 07 Jan 2016 Posts: 272 Location: My house
|
Posted: Sat Sep 15, 2018 12:25 pm Post subject: |
|
|
I know what is written in celua.txt, and I need to use postURL.
And so far nothing ... _________________
... |
|
| Back to top |
|
 |
FreeER Grandmaster Cheater Supreme
Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Sat Sep 15, 2018 1:20 pm Post subject: |
|
|
well... have you tried | Code: | | returndata = int:postURL("http://myhost/", "p=foo") | instead of | Code: | | returndata = int:getURL("http://myhost/", "p=foo") | which is what you put in your question? I don't know of any actual website to test with but... that seems like it's worth a try.
You might also try with '.' instead of ':' since x:y(...) is just syntactic sugar for x.y(x,...) and the celua.txt documentation doesn't say to pass the internet object to it... _________________
|
|
| Back to top |
|
 |
|