Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Macros | Typedefs | Enumerations | Functions
afw_request.h File Reference

Header for interface afw_request* helpers. More...

#include "afw_interface.h"

Go to the source code of this file.

Macros

#define AFW_REQUEST_Q_PN_CONTENT_TYPE   AFW_Q_CONTENT_TYPE
 Request property name CONTENT_TYPE quoted string. More...
 
#define AFW_REQUEST_s_PN_CONTENT_TYPE   afw_s_CONTENT_TYPE
 Request property name CONTENT_TYPE afw_utf8_t. More...
 
#define AFW_REQUEST_Q_PN_CONTENT_LENGTH   AFW_Q_CONTENT_LENGTH
 Request property name CONTENT_LENGTH quoted string. More...
 
#define AFW_REQUEST_s_PN_CONTENT_LENGTH   afw_s_CONTENT_LENGTH
 Request property name CONTENT_LENGTH afw_utf8_t. More...
 
#define AFW_REQUEST_Q_PN_HTTP_ACCEPT   AFW_Q_HTTP_ACCEPT
 Request property name HTTP_ACCEPT quoted string.
 
#define AFW_REQUEST_s_PN_HTTP_ACCEPT   afw_s_HTTP_ACCEPT
 Request property name HTTP_ACCEPT afw_utf8_t.
 
#define AFW_REQUEST_Q_PN_PATH_INFO   AFW_Q_PATH_INFO
 Request property name PATH_INFO quoted string. More...
 
#define AFW_REQUEST_s_PN_PATH_INFO   afw_s_PATH_INFO
 Request property name PATH_INFO afw_utf8_t. More...
 
#define AFW_REQUEST_Q_PN_QUERY_STRING   AFW_Q_QUERY_STRING
 Request property name QUERY_STRING quoted string. More...
 
#define AFW_REQUEST_s_PN_QUERY_STRING   afw_s_QUERY_STRING
 Request property name QUERY_STRING afw_utf8_t. More...
 
#define AFW_REQUEST_Q_PN_REQUEST_METHOD   AFW_Q_REQUEST_METHOD
 Request property name REQUEST_METHOD quoted string. More...
 
#define AFW_REQUEST_s_PN_REQUEST_METHOD   afw_s_REQUEST_METHOD
 Request accept header REQUEST_METHOD afw_utf8_t. More...
 
#define AFW_REQUEST_Q_PN_REQUEST_URI   AFW_Q_REQUEST_URI
 Request property name REQUEST_URI quoted string. More...
 
#define AFW_REQUEST_s_PN_REQUEST_URI   afw_s_REQUEST_URI
 Request property name REQUEST_URI afw_utf8_t. More...
 
#define AFW_REQUEST_Q_METHOD_GET   AFW_Q_GET
 Request method GET quoted string.
 
#define AFW_REQUEST_s_METHOD_GET   afw_s_GET
 Request method GET afw_utf8_t.
 
#define AFW_REQUEST_Q_METHOD_POST   AFW_Q_POST
 
#define AFW_REQUEST_s_METHOD_POST   afw_s_POST
 
#define AFW_REQUEST_Q_METHOD_PUT   AFW_Q_PUT
 
#define AFW_REQUEST_s_METHOD_PUT   afw_s_PUT
 
#define AFW_REQUEST_Q_METHOD_PATCH   AFW_Q_PATCH
 
#define AFW_REQUEST_s_METHOD_PATCH   afw_s_PATCH
 
#define AFW_REQUEST_Q_METHOD_DELETE   AFW_Q_DELETE
 
#define AFW_REQUEST_s_METHOD_DELETE   afw_s_DELETE
 

Typedefs

typedef enum afw_request_state_e afw_request_state_t
 

Enumerations

enum  afw_request_state_e {
  afw_request_state_initial , afw_request_state_content_read , afw_request_state_status_set , afw_request_state_header_written ,
  afw_request_state_response_written , afw_request_state_response_finished
}
 

Functions

const afw_utf8_tafw_request_body_to_utf8 (const afw_request_t *instance, const afw_pool_t *p, afw_xctx_t *xctx)
 Read a request body into a utf-8 string in a specifed pool. More...
 
const afw_value_tafw_request_body_to_value (const afw_request_t *instance, const afw_pool_t *p, afw_xctx_t *xctx)
 Read a request body to value in a specifed pool. More...
 
 afw_request_get_response_content_type (const afw_request_t *instance, const afw_content_type_t **response_content_type, const afw_utf8_t **type, const afw_utf8_t **type_parameter, afw_xctx_t *xctx)
 
const afw_content_type_tafw_request_prepare_response_content_type (const afw_request_t *instance, afw_xctx_t *xctx)
 
 afw_request_response_body_raw_writer_create (const afw_request_t *request, afw_xctx_t *xctx)
 
void afw_request_write_value_to_response_body (const afw_request_t *instance, const afw_value_t *value, const afw_object_options_t *options, afw_xctx_t *xctx)
 Write value to response body. More...
 
void afw_request_write_error_to_response_body (const afw_request_t *instance, const afw_utf8_t *code, const afw_error_t *error, afw_xctx_t *xctx)
 Write xctx error to response body. More...
 
void afw_request_write_success_response (const afw_request_t *instance, const afw_object_t *response, afw_xctx_t *xctx)
 Write simple success to response body. More...
 

Detailed Description

Header for interface afw_request* helpers.

Definition in file afw_request.h.