Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
tcp/http/http.h
- Committer:
- andrewboyson
- Date:
- 2019-08-28
- Revision:
- 156:be12b8fd5b21
- Parent:
- 154:ba9879b19d9f
File content as of revision 156:be12b8fd5b21:
#include <stdbool.h>
#include <stdarg.h>
#include <stdint.h>
#include <time.h>
extern void   HttpAddChar         (char c);
extern void   HttpFillChar        (char c, int length);
extern int    HttpAddText         (const char* text);
extern int    HttpAddV            (char *fmt, va_list argptr);
extern int    HttpAddF            (char *fmt, ...);
extern void   HttpAddData         (const char* data, int length);
extern void   HttpAddStream       (void (*startFunction)(void), int (*enumerateFunction)(void));
extern void   HttpAddNibbleAsHex  (int value);
extern void   HttpAddByteAsHex    (int value);
extern void   HttpAddInt12AsHex   (int value);
extern void   HttpAddInt16AsHex   (int value);
extern void   HttpAddInt32AsHex   (int value);
extern void   HttpAddInt64AsHex   (int64_t value);
extern void   HttpAddBytesAsHex   (const uint8_t* value, int size);
extern void   HttpAddBytesAsHexRev(const uint8_t* value, int size);
extern void   HttpAddTm           (struct tm* ptm);
extern bool   HttpBufFilled       (void);
extern void   HttpOk(const char* contentType, const char* cacheControl, const char* lastModifiedDate, const char* lastModifiedTime);
extern char*  HttpOkCookieName;
extern char*  HttpOkCookieValue;
extern int    HttpOkCookieMaxAge;
extern void   HttpNotFound        (void);
extern void   HttpNotModified     (void);
extern int    HttpRequestRead(char *p, int len, char** ppMethod, char** ppPath, char** ppQuery, char** ppLastModified, char** ppCookies, int* pContentLength);
extern char*  HttpCookiesSplit   (char* pCookies, char** ppName, char** ppValue);
extern char*  HttpQuerySplit     (char* pQuery,   char** ppName, char** ppValue);
extern int    HttpQueryValueAsInt(char* pValue);
extern void   HttpQueryUnencode  (char* pValue);
extern bool   HttpTrace;
extern void   HttpDateFromDateTime(const char* date, const char *ptime, char* ptext);
extern void   HttpDateFromNow(char* pText);
extern bool HttpSameStr               (const char* pa,   const char* pb);
extern bool HttpSameStrCaseInsensitive(const char* pa,   const char* pb);
extern bool HttpSameDate              (const char* date, const char* time, const char* pOtherDate);
#define HTTP_DATE_LENGTH 30
extern void (*HttpFunctionReset  )(int connection);
extern void (*HttpFunctionRequest)(int connection, int size, char* pRequestStream, uint32_t positionInRequestStream);
extern bool (*HttpFunctionPoll   )(int connection, bool clientFinished);