LTI Tool Provider Library  3.0.2
PHP class library for building LTI Tool Providers
HTTPMessage Class Reference

Class to represent an HTTP message. More...

Public Member Functions

 __construct ($url, $method= 'GET', $params=null, $header=null)
 Class constructor. More...
 
 send ()
 Send the request to the target URL. More...
 

Data Fields

 $ok = false
 True if message was sent successfully. More...
 
 $request = null
 Request body. More...
 
 $requestHeaders = ''
 Request headers. More...
 
 $response = null
 Response body. More...
 
 $responseHeaders = ''
 Response headers. More...
 
 $status = 0
 Status of response (0 if undetermined). More...
 
 $error = ''
 Error message. More...
 

Detailed Description

Class to represent an HTTP message.

Author
Stephen P Vickers svick.nosp@m.ers@.nosp@m.imsgl.nosp@m.obal.nosp@m..org
Date
2016
Version
3.0.0
Licence:
http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0

Definition at line 14 of file HTTPMessage.php.

Constructor & Destructor Documentation

__construct (   $url,
  $method = 'GET',
  $params = null,
  $header = null 
)

Class constructor.

Parameters
string$urlURL to send request to
string$methodRequest method to use (optional, default is GET)
mixed$paramsAssociative array of parameter values to be passed or message body (optional, default is none)
string$headerValues to include in the request header (optional, default is none)

Definition at line 88 of file HTTPMessage.php.

Member Function Documentation

send ( )

Send the request to the target URL.

Returns
boolean True if the request was successful

Definition at line 109 of file HTTPMessage.php.

References HTTPMessage\$ok, and HTTPMessage\$requestHeaders.

Field Documentation

error $error = ''

Error message.

Definition at line 64 of file HTTPMessage.php.

boolean $ok = false

True if message was sent successfully.

Definition at line 22 of file HTTPMessage.php.

Referenced by HTTPMessage\send().

request $request = null

Request body.

Definition at line 29 of file HTTPMessage.php.

request_headers $requestHeaders = ''

Request headers.

Definition at line 36 of file HTTPMessage.php.

Referenced by HTTPMessage\send().

response $response = null

Response body.

Definition at line 43 of file HTTPMessage.php.

response_headers $responseHeaders = ''

Response headers.

Definition at line 50 of file HTTPMessage.php.

status $status = 0

Status of response (0 if undetermined).

Definition at line 57 of file HTTPMessage.php.


The documentation for this class was generated from the following file: