9#include "platforms/is_platform.h"
Fetch options builder (fluent interface)
fl::task::Promise< Response > mPromise
fl::string mResponseBuffer
void handle_dns_lookup() FL_NO_EXCEPT
void close_socket() FL_NO_EXCEPT
void update() FL_NO_EXCEPT
Pump the state machine (called by fl::task every update interval)
void handle_sending() FL_NO_EXCEPT
void handle_connecting() FL_NO_EXCEPT
Response parse_http_response(const fl::string &raw) FL_NO_EXCEPT
~FetchRequest() FL_NO_EXCEPT
Destructor - closes socket if still open.
State get_state() const FL_NO_EXCEPT
Get current state.
FetchRequest(const fl::string &url, const FetchOptions &opts, fl::task::Promise< Response > promise) FL_NO_EXCEPT
Construct a new fetch request.
void handle_receiving() FL_NO_EXCEPT
@ DNS_LOOKUP
Resolving hostname (brief blocking ~10-100ms)
@ RECEIVING
Receiving HTTP response (non-blocking)
@ SENDING
Sending HTTP request (non-blocking)
@ CONNECTING
Waiting for socket connection (non-blocking)
@ COMPLETED
Successfully completed.
bool is_done() const FL_NO_EXCEPT
Check if request is complete (success or failure)
void complete_error(const char *message) FL_NO_EXCEPT
void complete_success(const Response &resp) FL_NO_EXCEPT
fl::string mRequestBuffer
HTTP response class (unified interface)
Promise class that provides fluent .then() and .catch_() semantics This is a lightweight wrapper arou...
Unified HTTP fetch API for FastLED (cross-platform)
bool build_http_request(const RequestOptions &options, const fl::string &path, const fl::string &host, fl::string *out) FL_NO_EXCEPT
The HTTP/1.1 request FetchRequest sends: options.method (GET when empty) on the request line,...
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Base definition for an LED controller.
Promise-based fluent API for FastLED - standalone async primitives.
Request options (matches JavaScript fetch RequestInit)
Lightweight URL parser for embedded environments.