1. nulln

    OP nulln Newbie
    Newcomer

    Joined:
    Jul 28, 2018
    Messages:
    4
    Country:
    Australia
    What would be the easiest way to go about sending requests to a server, and getting a response?

    I'm trying to make a request to my server and use query strings to pass data. Something like
    Code:
    site.example/make_request?heressomedata=hello&additionaldata=sup
    Then I could return the response from the server in json, have the wii read it, and boom! client-server communication. But before I can do any of that, I need to know how to even send data to the server in the first place.
     
  2. GreyWolf

    GreyWolf GBAtemp Guru
    Member

    Joined:
    Mar 2, 2015
    Messages:
    5,401
    Country:
    United States
    The console has no HTTP stack so you'll have to bring your own. You can use bushing's. It's what most homebrew seems to use. I don't think it was ever in a repository so you can just grab http.c and http.h from another project like Nintendont.
     
    nulln and kaisersozeh like this.
  3. newo

    newo GBAtemp Fan
    Member

    Joined:
    Apr 7, 2011
    Messages:
    449
    Country:
    Jamaica
  4. nulln

    OP nulln Newbie
    Newcomer

    Joined:
    Jul 28, 2018
    Messages:
    4
    Country:
    Australia
    Sorry I'm a couple days late, but with a bit of finicking I got newo's example to compile. I've tried to use the http.c files, I came across them from WiiMC. I would have gone with that if I could have gotten it to work. Thank you both so much, you've been a great help! :D
     
  5. newo

    newo GBAtemp Fan
    Member

    Joined:
    Apr 7, 2011
    Messages:
    449
    Country:
    Jamaica
    Always glad to help when I can especially since there are not many people into wii homebrew dev.

    One issue I had with http is that some servers might take upto 15 seconds to respond to each request, this happen because of a issue with http headers. Might not be something you need to worry about right now but if comes up let us know.
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - Development, networking, question