cp_socket

Section: cp_socket (3)
Updated: OCTOBER 2005
Index Return to Main Contents
 

NAME

cp_http_request - http request descriptor  

SYNOPSIS

#include <cprops/http.h>

char *cp_http_request_get_header(cp_http_request *req, char *name);

char *cp_http_request_get_parameter(cp_http_request *req, char *name);

cp_http_session *
      cp_http_request_get_session(cp_http_request *request,
                                  int create);

void cp_http_request_dump(cp_http_request *req);  

DESCRIPTION

When a cp_httpsocket receives a request for a certain service, the request headers and GET or POST variables issued by the remote client are parsed into a request descriptor that is passed to the service handler.

cp_http_request_get_header retrieves the value of an HTTP header from the request descriptor.

cp_http_request_get_parameter retrieves the value of a GET or POST CGI variable.

cp_http_request_get_session returns a cp_http_session object for the given request if one exists. If no active session exists and the create parameter is non-zero, a new session is created. See cp_http_session(3) for details of session creation and initialization.

cp_http_request_dump dumps the request content to the standard output stream.  

RETURN VALUE

cp_http_request_get_header and cp_http_request_get_parameter return the value set for the name parameter or header or NULL if no value is set.  

SEE ALSO

cp_httpsocket(3), cp_http_response(3), cp_http_service(3), cp_http_session(3)


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 21:26:15 GMT, January 30, 2006
SourceForge.net Logo