EventHttpConnection::setTimeout
EventHttpRequest::addHeader
Event
PHP Manual

# The EventHttpRequest class

(PECL event >= 1.4.0-beta)

## Einführung

Represents an HTTP request.

## Klassenbeschreibung

EventHttpRequest {
/* Constants */
const integer CMD_GET = 1 ;
const integer CMD_POST = 2 ;
const integer CMD_HEAD = 4 ;
const integer CMD_PUT = 8 ;
const integer CMD_DELETE = 16 ;
const integer CMD_OPTIONS = 32 ;
const integer CMD_TRACE = 64 ;
const integer CMD_CONNECT = 128 ;
const integer CMD_PATCH = 256 ;
const integer INPUT_HEADER = 1 ;
const integer OUTPUT_HEADER = 2 ;
/* Methoden */
public bool addHeader ( string `$key` , string `$value` , int `$type` )
public void cancel ( void )
public void clearHeaders ( void )
public __construct ( callable `$callback` [, mixed `$data` = `NULL` ] )
public void findHeader ( string `$key` , string `$type` )
public void free ( void )
public void getCommand ( void )
public string getHost ( void )
public EventBuffer getInputBuffer ( void )
public array getInputHeaders ( void )
public EventBuffer getOutputBuffer ( void )
public void getOutputHeaders ( void )
public int getResponseCode ( void )
public string getUri ( void )
public void removeHeader ( string `$key` , string `$type` )
public void sendError ( int `$error` [, string `$reason` = `NULL` ] )
public void sendReply ( int `$code` , string `$reason` [, EventBuffer `$buf` ] )
public void sendReplyChunk ( EventBuffer `$buf` )
public void sendReplyEnd ( void )
public void sendReplyStart ( int `$code` , string `$reason` )
}

## Vordefinierte Konstanten

`EventHttpRequest::CMD_GET`

  GET method(command)

`EventHttpRequest::CMD_POST`

  POST method(command)

`EventHttpRequest::CMD_HEAD`

  HEAD method(command)

`EventHttpRequest::CMD_PUT`

  PUT method(command)

`EventHttpRequest::CMD_DELETE`

  DELETE command(method)

`EventHttpRequest::CMD_OPTIONS`

  OPTIONS method(command)

`EventHttpRequest::CMD_TRACE`

  TRACE method(command)

`EventHttpRequest::CMD_CONNECT`

  CONNECT method(command)

`EventHttpRequest::CMD_PATCH`

  PATCH method(command)

`EventHttpRequest::INPUT_HEADER`

  Request input header type.

`EventHttpRequest::OUTPUT_HEADER`

  Request output header type.

## Inhaltsverzeichnis

- EventHttpRequest::addHeader — Adds an HTTP header to the headers of the request
- EventHttpRequest::cancel — Cancels a pending HTTP request
- EventHttpRequest::clearHeaders — Removes all output headers from the header list of the request
- EventHttpRequest::__construct — Constructs EventHttpRequest object
- EventHttpRequest::findHeader — Finds the value belonging a header
- EventHttpRequest::free — Frees the object and removes associated events
- EventHttpRequest::getCommand — Returns the request command(method)
- EventHttpRequest::getHost — Returns the request host
- EventHttpRequest::getInputBuffer — Returns the input buffer
- EventHttpRequest::getInputHeaders — Returns associative array of the input headers
- EventHttpRequest::getOutputBuffer — Returns the output buffer of the request
- EventHttpRequest::getOutputHeaders — Returns associative array of the input headers
- EventHttpRequest::getResponseCode — Returns the the response code
- EventHttpRequest::getUri — Returns the request URI
- EventHttpRequest::removeHeader — Removes an HTTP header from the headers of the request
- EventHttpRequest::sendError — Send an HTML error message to the client
- EventHttpRequest::sendReply — Send an HTML reply to the client
- EventHttpRequest::sendReplyChunk — Send another data chunk as part of an ongoing chunked reply
- EventHttpRequest::sendReplyEnd — Complete a chunked reply, freeing the request as appropriate
- EventHttpRequest::sendReplyStart — Initiate a chunked reply

EventHttpConnection::setTimeout
EventHttpRequest::addHeader
Event
PHP Manual