Raw source file available here .
// Written by retoor@molodetz.nl
// This program repeatedly sends an HTTP GET request to a server running on localhost at port 8888 and prints the server's response.
// The program uses a custom library "rhttp.h" for HTTP requests, which is not a standard C library.
// MIT License
#include "rhttp.h"
#include <stdio.h>
int main() {
while (1) {
char *response = rhttp_client_get("127.0.0.1", 8888, "/");
if (response) {
printf("%s\n", response);
}
}
return 0;
}