Fixed custom headers and Basic authorization, added support for redirection, functional file download interface can be used for SW updates and more.

Dependents:   Sample_HTTPClient Sample_HTTPClient LWM2M_NanoService_Ethernet LWM2M_NanoService_Ethernet ... more

Fork of HTTPClient by Vincent Wochnik

Embed: (wiki syntax)

« Back to documentation index

IHTTPDataOut Class Reference

IHTTPDataOut Class Reference

This is a simple interface for HTTP data storage (impl examples are Key/Value Pairs, File, etc...) More...

#include <IHTTPData.h>

Inherited by HTTPMap, and HTTPText.

Protected Member Functions

virtual void readReset ()=0
 Reset stream to its beginning Called by the HTTPClient on each new request.
virtual int read (char *buf, size_t len, size_t *pReadLen)=0
 Read a piece of data to be transmitted.
virtual int getDataType (char *type, size_t maxTypeLen)=0
 Get MIME type.
virtual bool getIsChunked ()=0
 Determine whether the HTTP client should chunk the data Used for Transfer-Encoding header.
virtual size_t getDataLen ()=0
 If the data is not chunked, get its size Used for Content-Length header.

Friends

class HTTPClient

Detailed Description

This is a simple interface for HTTP data storage (impl examples are Key/Value Pairs, File, etc...)

Definition at line 28 of file IHTTPData.h.


Member Function Documentation

virtual size_t getDataLen (  ) [protected, pure virtual]

If the data is not chunked, get its size Used for Content-Length header.

Implemented in HTTPMap, and HTTPText.

virtual int getDataType ( char *  type,
size_t  maxTypeLen 
) [protected, pure virtual]

Get MIME type.

Parameters:
[out]typeInternet media type from Content-Type header
[in]maxTypeLenis the size of the type buffer to write to

Implemented in HTTPJson, HTTPMap, and HTTPText.

virtual bool getIsChunked (  ) [protected, pure virtual]

Determine whether the HTTP client should chunk the data Used for Transfer-Encoding header.

Implemented in HTTPMap, and HTTPText.

virtual int read ( char *  buf,
size_t  len,
size_t *  pReadLen 
) [protected, pure virtual]

Read a piece of data to be transmitted.

Parameters:
[out]bufPointer to the buffer on which to copy the data
[in]lenLength of the buffer
[out]pReadLenPointer to the variable on which the actual copied data length will be stored

Implemented in HTTPMap, and HTTPText.

virtual void readReset (  ) [protected, pure virtual]

Reset stream to its beginning Called by the HTTPClient on each new request.

Implemented in HTTPMap, and HTTPText.