|
KPN Things Device SDK
|
Data Structures | |
| class | HttpFirmwareDownload |
Functions | |
| size_t | httpPost (char buffer[], int bufferSize, const char key[], const char host[], const char path[], SenMLBasePack &body) |
| int | getHttpBodyStart (const char response[], int responseLength) |
| int | strstr_n (const char data[], int dataLength, const char needle[], int needleLength) |
| int ThingsML::getHttpBodyStart | ( | const char | response[], |
| int | responseLength | ||
| ) |
Finds where the http headers end and the body begins. Will return the beginning if the end of the http headers could not be found.
| size_t ThingsML::httpPost | ( | char | buffer[], |
| int | bufferSize, | ||
| const char | key[], | ||
| const char | host[], | ||
| const char | path[], | ||
| SenMLBasePack & | body | ||
| ) |
Generates a complete http POST request ready to be sent over an tcp socket.
| buffer | output buffer |
| bufferSize | the size of the output buffer |
| key | the secret as configured for the device |
| host | the http host for the http Host: header |
| path | the http path for the http start |
| int ThingsML::strstr_n | ( | const char | data[], |
| int | dataLength, | ||
| const char | needle[], | ||
| int | needleLength | ||
| ) |
Fixed length strstr implementation
| data | the data to search |
| dataLength | the length of data |
| needle | the needle to search for |
| needleLength | the length of the needle |