QuickIO  0.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Functions
http.h File Reference

Useful utilities for doing asynchronous HTTP requests and parsing HTTP responses. More...

#include "qev.h"

Go to the source code of this file.

Classes

struct  qev_http_request
 Holds information about a parsed HTTP response. More...
 

Functions

gboolean qev_http_request_parse (gchar *head, struct qev_http_request *headers)
 Parse the given HTTP headers. More...
 
gchar * qev_http_header (const struct qev_http_request *headers, const gchar *key)
 Get the header with the given key. More...
 

Detailed Description

Useful utilities for doing asynchronous HTTP requests and parsing HTTP responses.

Author
Andrew Stone andre.nosp@m.w@cl.nosp@m.ovar..nosp@m.com

Function Documentation

gchar* qev_http_header ( const struct qev_http_request headers,
const gchar *  key 
)

Get the header with the given key.

Parameters
headersThe headers to search through
keyThe header that is wanted
gboolean qev_http_request_parse ( gchar *  head,
struct qev_http_request headers 
)

Parse the given HTTP headers.

Attention
This function does not actually validate the method, url, or anything. If something looks like it's sorta in HTTP form, it will probably be parsed. Validation is your responsibility. Be sure to check the method, url, and any applicable headers.
Parameters
headThe headers to parse up. This string will be modified in place and chooped into the relevant headers and values populated in headers.
[out]headersWhere information about the headers should be placed
Returns
If the headers were parsed successfully.