Jump to content




http post


10 replies to this topic

#1 roger109z

  • Members
  • 53 posts
  • LocationCali beetch

Posted 28 August 2016 - 07:06 PM

how do I handle http.post requests server side?

#2 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 28 August 2016 - 07:21 PM

What type of server are you using? PHP? Java? Something else? It varies depending on the language.

#3 roger109z

  • Members
  • 53 posts
  • LocationCali beetch

Posted 28 August 2016 - 07:23 PM

php it interacts with CC the best (as far as I know)

#4 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 28 August 2016 - 07:33 PM

In that case, I'll direct you to php.net.

#5 TheRockettek

  • Members
  • 547 posts
  • LocationRem is best girl

Posted 28 August 2016 - 07:46 PM

http://php.net/manua...iables.post.php

Yep it is like _GET :P


#6 MKlegoman357

  • Members
  • 1,170 posts
  • LocationKaunas, Lithuania

Posted 28 August 2016 - 08:41 PM

ComputerCraft's http.post() sends a generic POST request to the server, so a simple Google search of "How to handle post request in PHP" should give you enough information about how to handle it.

#7 roger109z

  • Members
  • 53 posts
  • LocationCali beetch

Posted 28 August 2016 - 08:48 PM

why thank you good person

#8 Emma

  • Members
  • 216 posts
  • Locationtmpim

Posted 30 August 2016 - 11:55 PM

Just something to keep in mind, cc can't make https requests, any attempt to route traffic through https will be redirected to http.

Edited by Incinirate, 04 September 2016 - 02:10 AM.


#9 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 31 August 2016 - 12:06 AM

That's no longer the case, as far as I'm aware.

#10 Anavrins

  • Members
  • 775 posts

Posted 31 August 2016 - 01:14 AM

View PostIncinirate, on 30 August 2016 - 11:55 PM, said:

Just something to keep in mind, cc can't make https requests, any attempt to route traffic through https will be redirected to http.
That's false, I can connect to https twitter, and as far as I know it's https only, Wiresharks also tells me that the connection was made over TLS.
The only issue I had with https pages not loading in CC (and OC for that matter) is when a certificate is signed with an authority that isn't in Java's truststore, such as "Let's Encrypt".

#11 Emma

  • Members
  • 216 posts
  • Locationtmpim

Posted 04 September 2016 - 01:32 AM

Hm, very strange, last time I checked, my traffic was re-routed through http, I knew this because the server I was interfacing with rejects plain http. Although it's probably because I was using an emulator, I'll test it in-game real quick and edit my post.

Edit: Yep, just tested in-game and it works, please disregard my previous post.

Edited by Incinirate, 04 September 2016 - 02:10 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users