EventHttpRequest 类

(PECL event >= 1.4.0-beta)

介绍

表示一个 HTTP 请求。

类概要

class EventHttpRequest {
/* 常量 */
const int CMD_GET = 1;
const int CMD_POST = 2;
const int CMD_HEAD = 4;
const int CMD_PUT = 8;
const int CMD_DELETE = 16;
const int CMD_OPTIONS = 32;
const int CMD_TRACE = 64;
const int CMD_CONNECT = 128;
const int CMD_PATCH = 256;
const int INPUT_HEADER = 1;
const int OUTPUT_HEADER = 2;
/* 方法 */
public addHeader( string $key , string $value , int $type ): bool
public cancel(): void
public clearHeaders(): void
public __construct( callable $callback , mixed $data = null )
public findHeader( string $key , string $type ): void
public free(): void
public getCommand(): void
public getHost(): string
public getUri(): 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 sendReplyEnd(): void
public sendReplyStart( int $code , string $reason ): void
}

预定义常量

EventHttpRequest::CMD_GET

GET 方法(命令)

EventHttpRequest::CMD_POST

POST 方法(命令)

EventHttpRequest::CMD_HEAD

HEAD 方法(命令)

EventHttpRequest::CMD_PUT

PUT 方法(命令)

EventHttpRequest::CMD_DELETE

DELETE 命令(方法)

EventHttpRequest::CMD_OPTIONS

OPTIONS 方法(命令)

EventHttpRequest::CMD_TRACE

TRACE 方法(命令)

EventHttpRequest::CMD_CONNECT

CONNECT 方法(命令)

EventHttpRequest::CMD_PATCH

PATCH 方法(命令)

EventHttpRequest::INPUT_HEADER

请求输入标头类型。

EventHttpRequest::OUTPUT_HEADER

请求输出标头类型。

目录

添加注释

用户贡献的笔记

此页面没有用户贡献的笔记。
To Top