# tasks/ext/HttpRequestTask.php

A HTTP request task.

Making an HTTP request and try to match the response against an provided regular expression.

Author
  Benjamin Schultz
Package
  phing.tasks.ext
Since
  2.4.1
Version
  $Id: HttpRequestTask.php 764 2010-04-11 18:18:51Z bschultz $

## \HttpRequestTask
jump to top

Package: phing\tasks\ext

A HTTP request task.

Making an HTTP request and try to match the response against an provided regular expression.

Parent(s)
  \Task < \ProjectComponent
Author
  Benjamin Schultz
Since
  2.4.1
Version
  $Id: HttpRequestTask.php 764 2010-04-11 18:18:51Z bschultz $

### Properties

`string $_authPassword= ''''`

Holds the authentication password

Default value`''`Details

Type
  string

`string $_authScheme= ''`

Holds the authentication scheme

Details

Type
  string

`string $_authUser= 'null'`

Holds the authentication user name

Default value `null` Details

Type
  string

`\array<Parameter> $_configData= 'array()'`

Holds additional config data for HTTP_Request2

Default value `array()`Details

Type
  \array<Parameter>

`\array<Parameter> $_headers= 'array()'`

Holds additional header data

Default value `array()`Details

Type
  \array<Parameter>

`\array<string> $_observerEvents= 'array( 'connect''`

Holds the events that will be logged

Default value `array( 'connect'`Details

Type
  \array<string>

`string $_responseRegex= ''''`

Holds the regular expression that should match the response

Default value`''`Details

Type
  string

`string $_url= 'null'`

Holds the request URL

Default value `null` Details

Type
  string

`boolean $_verbose= 'false'`

Whether to enable detailed logging

Default value `false` Details

Type
  boolean

### Methods

`createConfig( ) : \Parameter`

Creates a config parameter for this task

Returns

Type | Description
--- | ---
\Parameter | The created parameter

`createHeader( ) : \Parameter`

Creates an additional header for this task

Returns

Type | Description
--- | ---
\Parameter | The created header

`getDescription( ) : void`

`getLocation( ) : void`

`getOwningTarget( ) : void`

`getProject( ) : void`

`getRegisterSlot( ) : void`

`getRuntimeConfigurableWrapper( ) : void`

`getTaskName( ) : void`

`getTaskType( ) : void`

`init( ) : void`

Load the necessary environment for running this task.

Throws

Exception | Description
--- | ---
\BuildException |

`log( ) : void`

`main( ) : void`

Make the http request

`maybeConfigure( ) : void`

`perform( ) : void`

`setAuthPassword( string $password ) : void`

Sets the authentication password

Parameters

Name | Type | Description
--- | --- | ---
$password | string |

`setAuthScheme( string $scheme ) : void`

Sets the authentication scheme

Parameters

Name | Type | Description
--- | --- | ---
$scheme | string |

`setAuthUser( string $user ) : void`

Sets the authentication user name

Parameters

Name | Type | Description
--- | --- | ---
$user | string |

`setDescription( ) : void`

`setLocation( ) : void`

`setObserverEvents( string $observerEvents ) : void`

Sets a list of observer events that will be logged if verbose output is enabled.

Parameters

Name | Type | Description
--- | --- | ---
$observerEvents | string | List of observer events

`setOwningTarget( ) : void`

`setProject( ) : void`

`setResponseRegex( string $regex ) : void`

Sets the response regex

Parameters

Name | Type | Description
--- | --- | ---
$regex | string |

`setRuntimeConfigurableWrapper( ) : void`

`setTaskName( ) : void`

`setTaskType( ) : void`

`setUrl( string $url ) : void`

Sets the request URL

Parameters

Name | Type | Description
--- | --- | ---
$url | string |

`setVerbose( boolean $verbose ) : void`

Sets whether to enable detailed logging

Parameters

Name | Type | Description
--- | --- | ---
$verbose | boolean |

Documentation was generated by DocBlox 0.17.1.