Xively Official / mbed-libxively-5d6fdd4

Dependents:   xively-jumpstart-demo

Embed: (wiki syntax)

« Back to documentation index

http_layer_parser.c File Reference

http_layer_parser.c File Reference

Our simple HTTP parser [see http_layer_parser.h]. More...

Go to the source code of this file.

Functions

http_response_t * parse_http (http_response_t *response, const char *content)
 This function takes the pointer to the `http_response_t` structure and fills it with parsed data from the give buffer.

Variables

static const char XI_HTTP_STATUS_PATTERN [] = "[^\r\n]\r\n"
 the match pattern

Detailed Description

Our simple HTTP parser [see http_layer_parser.h].

Author:
Olgierd Humenczuk

Definition in file http_layer_parser.c.


Function Documentation

http_response_t* parse_http ( http_response_t *  response,
const char *  data 
)

This function takes the pointer to the `http_response_t` structure and fills it with parsed data from the give buffer.

While the parser looks at headers, satus line and content, it populates given pointer to `http_response_t`.

Returns:
Pointer or null if an error occurred.
Note:
It currently won't work against partial data.

Definition at line 158 of file http_layer_parser.c.


Variable Documentation

const char XI_HTTP_STATUS_PATTERN[] = "[^\r\n]\r\n" [static]

the match pattern

Definition at line 21 of file http_layer_parser.c.