|
Gin
|
Simple HTTP client for making GET requests. More...
#include <gin_http.h>
Classes | |
| struct | HttpResult |
| Result of an HTTP request. More... | |
Public Member Functions | |
| Http (juce::URL url) | |
| Creates an HTTP client for the specified URL. | |
| HttpResult | get () |
| Performs a synchronous HTTP GET request. | |
Simple HTTP client for making GET requests.
Http provides a lightweight, synchronous HTTP client built on top of SecureStreamingSocket. It supports both HTTP and HTTPS protocols, handles chunked transfer encoding, and returns complete response data including status code, headers, and body.
Key Features:
Usage: Create an Http instance with a URL, then call get() to perform the request. The method blocks until the response is received or an error occurs.
Note: This is a synchronous (blocking) operation. For non-blocking HTTP requests, consider using juce::URL::createInputStream() with a background thread or JUCE's built-in WebInputStream.
| Http::Http | ( | juce::URL | url | ) |
| HttpResult Http::get | ( | ) |
Performs a synchronous HTTP GET request.
Connects to the server, sends the GET request, and reads the complete response including headers and body. This method blocks until the request completes or fails.