376 posts
Location
[string "FindMe"]:23143: bad argument #1 to 'returnPos' (vector expected, got nil)
Posted 09 September 2014 - 07:05 AM
Im trying to make a program that logs into my github and updates the code
I know how to make it update the code, but I dont know how to log into the thing using http.post
8543 posts
Posted 09 September 2014 - 07:50 PM
You can't establish a session with the ComputerCraft http API, as far as I know.
376 posts
Location
[string "FindMe"]:23143: bad argument #1 to 'returnPos' (vector expected, got nil)
Posted 09 September 2014 - 08:02 PM
You can't establish a session with the ComputerCraft http API, as far as I know.
hmmm, that sucks
is there any way to tell if it logged in though?
108 posts
Posted 10 September 2014 - 12:23 AM
Are you attempting to use the web page meant for people, or the http api meant for robots?
376 posts
Location
[string "FindMe"]:23143: bad argument #1 to 'returnPos' (vector expected, got nil)
Posted 10 September 2014 - 12:52 AM
Are you attempting to use the web page meant for people, or the http api meant for robots?
Im trying to use the http api to login to github using http.post, but i dont know how to post the credentials onto the page
I use a scanner to check the webpage whenever it returns the source code
and if it matches the source code of the homepage then it returns success
108 posts
Posted 10 September 2014 - 04:01 AM
Since you're trying to use the webpage meant for people, you'd need to parse
https://github.com/login and send it back the hidden values it generates along with your username and password. So I think it'd be something along the lines of
http.post("https://github.com/login","utf8="..utf8.."&authenticity_token="..authenticity_token.."&login="..username.."&password="..password)
Though if possible, you should probably try and use
GitHub's api.