Receiving HTTP post and get requests

Godot Version

4.4 dev 1

Question

I want to receive a http request from another client and use that data in GDScript. Simple json data is perfectly fine, but sending bigger files like full images would be even better.
I’m just trying to test out some stuff with http requests, and Godot is the thing I am familiar with, so that’s where I wanna start.
(An arduino would probably be a better starting point though…)

Godot has a built-in HTTP Client class, but not a HTTP Server. You would have to write your own via a TCPServer.

How familiar with the spec are you? You mention arduino, why would that provide a better HTTP server?

I’m honestly very new to that http request stuff, I only really used it for interacting with my ollama machine. I thought that interacting with a Godot application this way would be really cool. Like, two computers both running the same software sending messages to each other…

I just mentioned arduino because I know that requests on there are rather easy.

If you can think of a way I could achieve simple back and fourth messaging using the built in HTTPClient and the HTTPRequest Node, I would be very open for that

At least one computer would have to be a HTTP server. The HTTP standard is fairly similar for requests and responses, but they are not interchangable. If you want to read the spec it’s available online here: RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1

Arduinos don’t have built-in internet connectivity, so I would argue that’s a tough starting point for a HTTP Server.

Here are some projects implementing a HTTP Server for Godot