20 lines
514 B
C
Raw Normal View History

2025-03-16 05:49:29 +01:00
// 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
2025-01-14 18:53:15 +01:00
#include "rhttp.h"
#include <stdio.h>
int main() {
while (1) {
char *response = rhttp_client_get("127.0.0.1", 8888, "/");
2025-03-16 05:49:29 +01:00
if (response) {
2025-01-14 18:53:15 +01:00
printf("%s\n", response);
2025-03-16 05:49:29 +01:00
}
2025-01-14 18:53:15 +01:00
}
return 0;
2025-03-16 05:49:29 +01:00
}