SunshinePHP 2020

La classe EventHttpRequest

(PECL event >= 1.4.0-beta)

Introduction

Représente une requête HTTP.

Synopsis de la classe

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 ;
/* Méthodes */
public addHeader ( string $key , string $value , int $type ) : bool
public cancel ( void ) : void
public clearHeaders ( void ) : void
public closeConnection ( void ) : void
public __construct ( callable $callback [, mixed $data = NULL ] )
public findHeader ( string $key , string $type ) : void
public free ( void ) : void
public getCommand ( void ) : void
public getHost ( void ) : string
public getInputBuffer ( void ) : EventBuffer
public getInputHeaders ( void ) : array
public getOutputBuffer ( void ) : EventBuffer
public getOutputHeaders ( void ) : void
public getResponseCode ( void ) : int
public getUri ( void ) : string
public removeHeader ( string $key , string $type ) : void
public sendError ( int $error [, string $reason = NULL ] ) : void
public sendReply ( int $code , string $reason [, EventBuffer $buf ] ) : void
public sendReplyChunk ( EventBuffer $buf ) : void
public sendReplyEnd ( void ) : void
public sendReplyStart ( int $code , string $reason ) : void
}

Constantes pré-définies

EventHttpRequest::CMD_GET

méthode GET (commande)

EventHttpRequest::CMD_POST

méthode POST (commande)

EventHttpRequest::CMD_HEAD

méthode HEAD (commande)

EventHttpRequest::CMD_PUT

méthode PUT (commande)

EventHttpRequest::CMD_DELETE

commande DELETE (méthode)

EventHttpRequest::CMD_OPTIONS

méthode OPTIONS (commande)

EventHttpRequest::CMD_TRACE

méthode TRACE (commande)

EventHttpRequest::CMD_CONNECT

méthode CONNECT (commande)

EventHttpRequest::CMD_PATCH

méthode PATCH (commande)

EventHttpRequest::INPUT_HEADER

Demande le type d'en-tête d'entrée.

EventHttpRequest::OUTPUT_HEADER

Demande le type d'en-tête de sortie.

Sommaire

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top