BSB Developer Docs
Loading...
Searching...
No Matches
http_headers.h
Go to the documentation of this file.
1
4
#pragma once
5
6
#include <core/string.h>
7
8
#ifdef __cplusplus
9
extern
"C"
{
10
#endif
11
15
typedef
struct
HttpHeader
{
16
FuriString*
key
;
17
FuriString*
value
;
18
}
HttpHeader
;
19
23
typedef
struct
HttpHeaders
HttpHeaders
;
24
30
HttpHeaders
*
http_headers_alloc
(
void
);
31
37
void
http_headers_free
(
HttpHeaders
* instance);
38
48
bool
http_headers_parse
(
HttpHeaders
* instance,
const
char
* data,
size_t
data_len);
49
57
size_t
http_headers_get_count
(
const
HttpHeaders
* instance);
58
71
const
HttpHeader
*
http_headers_get_by_index
(
const
HttpHeaders
* instance,
size_t
index);
72
87
const
HttpHeader
*
http_headers_get
(
const
HttpHeaders
* instance,
const
char
* key);
88
102
void
http_headers_set
(
HttpHeaders
* instance,
const
char
* key,
const
char
* value);
103
104
#ifdef __cplusplus
105
}
106
#endif
http_headers_get_count
size_t http_headers_get_count(const HttpHeaders *instance)
Get the number of header elements held in the instance.
Definition
http_headers.c:141
http_headers_alloc
HttpHeaders * http_headers_alloc(void)
Create an empty HttpHeaders instance.
Definition
http_headers.c:122
http_headers_parse
bool http_headers_parse(HttpHeaders *instance, const char *data, size_t data_len)
Parse the HTTP headers from a string.
Definition
http_headers.c:134
http_headers_set
void http_headers_set(HttpHeaders *instance, const char *key, const char *value)
Set the header element under the string key.
Definition
http_headers.c:158
http_headers_get_by_index
const HttpHeader * http_headers_get_by_index(const HttpHeaders *instance, size_t index)
Get the header element by its index.
Definition
http_headers.c:146
HttpHeader
struct HttpHeader HttpHeader
Single HTTP header structure (key: value).
http_headers_get
const HttpHeader * http_headers_get(const HttpHeaders *instance, const char *key)
Get the header element by its string key.
Definition
http_headers.c:152
http_headers_free
void http_headers_free(HttpHeaders *instance)
Delete the HttpHeaders instance.
Definition
http_headers.c:128
HttpHeader
Single HTTP header structure (key: value).
Definition
http_headers.h:15
HttpHeader::value
FuriString * value
Header value (e.g.
Definition
http_headers.h:17
HttpHeader::key
FuriString * key
Header key (e.g.
Definition
http_headers.h:16
HttpHeaders
Definition
http_headers.c:11
lib
http
http_headers.h
Generated by
1.12.0