mikroSDK Reference Manual
http_server_misc.h
Go to the documentation of this file.
1
31#ifndef _HTTP_SERVER_MISC_H
32#define _HTTP_SERVER_MISC_H
33
34//Dependencies
35#include "http/http_server.h"
36
37//C++ guard
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42//HTTP server related functions
43error_t httpReadRequestHeader(HttpConnection *connection);
44error_t httpParseRequestLine(HttpConnection *connection, char_t *requestLine);
45
46error_t httpReadHeaderField(HttpConnection *connection,
47 char_t *buffer, size_t size, char_t *firstChar);
48
49void httpParseHeaderField(HttpConnection *connection,
50 const char_t *name, char_t *value);
51
52void httpParseConnectionField(HttpConnection *connection,
53 char_t *value);
54
55void httpParseContentTypeField(HttpConnection *connection,
56 char_t *value);
57
58void httpParseAcceptEncodingField(HttpConnection *connection,
59 char_t *value);
60
61void httpParseCookieField(HttpConnection *connection, char_t *value);
62
63error_t httpReadChunkSize(HttpConnection *connection);
64
65void httpInitResponseHeader(HttpConnection *connection);
66error_t httpFormatResponseHeader(HttpConnection *connection, char_t *buffer);
67
68error_t httpSend(HttpConnection *connection,
69 const void *data, size_t length, uint_t flags);
70
71error_t httpReceive(HttpConnection *connection,
72 void *data, size_t size, size_t *received, uint_t flags);
73
74void httpGetAbsolutePath(HttpConnection *connection,
75 const char_t *relative, char_t *absolute, size_t maxLen);
76
77bool_t httpCompExtension(const char_t *filename, const char_t *extension);
78
79error_t httpDecodePercentEncodedString(const char_t *input,
80 char_t *output, size_t outputSize);
81
82void httpConvertArrayToHexString(const uint8_t *input,
83 size_t inputLen, char_t *output);
84
85//C++ guard
86#ifdef __cplusplus
87}
88#endif
89
90#endif
error_t
Error codes.
Definition error.h:43
HTTP server (HyperText Transfer Protocol)