PHP Velho Oeste 2024

Clase HttpResponse

(PECL pecl_http >= 0.7.0)

Sinopsis de la Clase

HttpResponse {
static void capture ( void )
static int getBufferSize ( void )
static bool getCache ( void )
static string getCacheControl ( void )
static string getContentDisposition ( void )
static string getContentType ( void )
static string getData ( void )
static string getETag ( void )
static string getFile ( void )
static bool getGzip ( void )
static mixed getHeader ([ string $name ] )
static int getLastModified ( void )
static string getRequestBody ( void )
static resource getRequestBodyStream ( void )
static array getRequestHeaders ( void )
static resource getStream ( void )
static float getThrottleDelay ( void )
static string guessContentType ( string $magic_file [, int $magic_mode = MAGIC_MIME ] )
static void redirect ([ string $url [, array $params [, bool $session = false [, int $status ]]]] )
static bool send ([ bool $clean_ob = true ] )
static bool setBufferSize ( int $bytes )
static bool setCache ( bool $cache )
static bool setCacheControl ( string $control [, int $max_age = 0 [, bool $must_revalidate = true ]] )
static bool setContentDisposition ( string $filename [, bool $inline = false ] )
static bool setContentType ( string $content_type )
static bool setData ( mixed $data )
static bool setETag ( string $etag )
static bool setFile ( string $file )
static bool setGzip ( bool $gzip )
static bool setHeader ( string $name [, mixed $value [, bool $replace = true ]] )
static bool setLastModified ( int $timestamp )
static bool setStream ( resource $stream )
static bool setThrottleDelay ( float $seconds )
static bool status ( int $status )
}

Elementos de la clase

Propiedades

Propiedades estáticas
Modificadores de acceso Tipo Nombre Descripción
protected boolean cache si se debe intentar el cacheo de la respuesta
protected boolean gzip si se debe comprimir con gzip al vuelo la entidad enviada
protected string eTag el ETag generado o personalizado
protected integer lastModified la fecha Unix generada o personalizada de la última modificación
protected string cacheControl configuración de Cache-Control
protected string contentType el Content-Type de la entidad enviada
protected string contentDisposition el Content-Disposition de la entidad enviada
protected integer bufferSize tamaño de la parte del buffer empleada para la limitación
protected double throttleDelay segundos para retrasar durante la limitación

Constantes predefinidas

Tipo Nombre Descripción
integer REDIRECT método de redirección aplicable a invitados
integer REDIRECT_PERM redirección permanente (301 Moved Permanently)
integer REDIRECT_FOUND redirección típica (302 Found)
integer REDIRECT_POST redirección aplicable a peticiones POST (303 See other)
integer REDIRECT_PROXY redirección por proxy (305 Use Proxy)
integer REDIRECT_TEMP redirección temporal (307 Temporary Redirect)

Tabla de contenidos

add a note add a note

User Contributed Notes

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