|
PingAccess Agent SDK for C
|
#include <stdlib.h>#include "apr.h"#include "apr_pools.h"#include "paa-http-server-facade.h"#include "paa-util.h"Go to the source code of this file.
Classes | |
| struct | paa_http_request_struct |
| struct | paa_http_response_struct |
| struct | paa_http_context_struct |
| struct | paa_http_client_struct |
Macros | |
| #define | APR_PAA_HTTP_ERROR (APR_PAA_HTTP_START + 0) |
Typedefs | |
| typedef struct paa_http_request_struct | paa_http_request |
| typedef void(* | paa_resp_status_cb) (unsigned int status, const char *reason, void *userdata) |
| typedef void(* | paa_resp_header_cb) (const char *name, const char *value, void *userdata) |
| typedef size_t(* | paa_resp_body_cb) (const unsigned char *src, size_t size, void *userdata) |
| typedef struct paa_http_response_struct | paa_http_response |
| typedef struct paa_http_context_struct | paa_http_context |
| typedef struct paa_http_client_struct | paa_http_client |
Header for the HTTP client
HTTP client interface functions can return APR_PAA_HTTP_ERROR to indicate there was error in the underlying HTTP library. Since the underlying HTTP library likely has numerous error conditions, a standard approach for dealing with this situation is to log the specific error condition and return the generic APR_PAA_HTTP_ERROR to the caller.
| #define APR_PAA_HTTP_ERROR (APR_PAA_HTTP_START + 0) |
indicates an error occurred sending a request to PingAccess
| typedef struct paa_http_client_struct paa_http_client |
forward declaration for paa_http_client
| typedef struct paa_http_context_struct paa_http_context |
forward declaration for paa_http_context
| typedef struct paa_http_request_struct paa_http_request |
forward declaration for paa_http_request
| typedef struct paa_http_response_struct paa_http_response |
forward declaration for paa_http_response
| typedef size_t(* paa_resp_body_cb) (const unsigned char *src, size_t size, void *userdata) |
Defines a callback for response body data. This callback can expect the data to be in the same format that it would appear on the wire. For example, if the response uses a chunked transfer-encoding, the data passed to this callback would already be in the chunked transfer-encoding.
| src | the data |
| size | the size of the data. A size of 0 should be used to indicate the end of the body. |
| typedef void(* paa_resp_header_cb) (const char *name, const char *value, void *userdata) |
Defines a callback for response header data. Callers do not need to worry about combining multiple headers with the same name into one distinct header.
| name | the name of the header |
| value | the value of the header |
| userdata | context data for the callback |
| typedef void(* paa_resp_status_cb) (unsigned int status, const char *reason, void *userdata) |
Defines a callback for response status data.
| status | the status of the response |
| reason | the reason string from the response. This data should be allocated in the response memory pool. |
| userdata | context data for the callback |
1.8.11