HTTPManagerBaseRequest

Extends \org\turbocommons\src\main\php\model\BaseStrictClass

Class that defines the base http request to be used with http manager

package

Default

Methods

__construct

__construct(\org\turbocommons\src\main\php\managers\httpmanager\string $url, \org\turbocommons\src\main\php\managers\httpmanager\int $timeout) 

Arguments

$url

\org\turbocommons\src\main\php\managers\httpmanager\string

$timeout

\org\turbocommons\src\main\php\managers\httpmanager\int

Protection to prevent accessing undefined properties to this class

__get(string $name) : void
inherited

Arguments

$name

string

The property name

Protection to prevent creating extra properties to this class

__set(string $name, string $value) : void
inherited

Arguments

$name

string

The property name

$value

string

The property value

Properties

The url that will be called as part of this request

url : 

Type(s)

Defines how much miliseconds will the http requests wait before failing with a timeout.

timeout : 

If set to 0, no value will be specifically defined, so the httpmanager default will be used.

Type(s)

A method to be executed inmediately after the request execution finishes successfully.

successCallback : 

The callback function must have the following signature: (response: string) => void

Type(s)

A method to be executed if an error happens to the request execution.

errorCallback : 

The callback function must have the following signature: (errorMsg:string, errorCode:number) => void

errorMsg will contain the error text and errorCode will contain the numeric error http value

Type(s)

A method to be executed always when the request finishes, even successfully or with an error.

finallyCallback : 

The callback function must have the following signature: () => void

Type(s)