rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
wa_http_t Struct Reference

#include <wa_fetch.h>

Data Fields

bool(*) open (void *ctx, const char *url, uint32_t timeout_ms, bool api, wa_http_head_t *head, char *loc, size_t loc_cap)
int32_t(*) read (void *ctx, uint8_t *dst, uint32_t n, uint32_t timeout_ms)
void(*) close (void *ctx)
void * ctx

Detailed Description

The HTTP client: one request at a time, the platform's.

Field Documentation

◆ open

bool(*) wa_http_t::open(void *ctx, const char *url, uint32_t timeout_ms, bool api, wa_http_head_t *head, char *loc, size_t loc_cap)

GET url, waiting timeout_ms at most for each step; with api also the headers Accept: FW_REL_API_ACCEPT and X-GitHub-Api-Version: FW_REL_API_VERSION. The head in head, the Location's bytes (not terminated) in loc of loc_cap. No redirect is followed. False: no connection, or no head in time.

◆ read

int32_t(*) wa_http_t::read(void *ctx, uint8_t *dst, uint32_t n, uint32_t timeout_ms)

Up to n body bytes: more than 0 read, 0 the end, below 0 broke off or nothing in timeout_ms. On a chunked body 0 is its last chunk only: a body closed before it is below 0.


The documentation for this struct was generated from the following file: