Overview

Namespaces

  • Genetsis
    • core
      • activityid
      • user
  • None

Classes

  • AccessToken
  • ClientToken
  • Encryption
  • FileCache
  • LogConfig
  • LoginStatus
  • LoginStatusType
  • OAuth
  • OAuthConfig
  • OauthTemplate
  • RefreshToken
  • Request
  • StoredToken
  • Things
  • User

Interfaces

  • iTokenTypes

Exceptions

  • InvalidGrantException
  • Overview
  • Namespace
  • Class

Class Request

Namespace: Genetsis\core
Located at core/Request.php
Methods summary
public static array
# execute( string $url, array $parameters = array(), string $http_method = Genetsis\core\Request::HTTP_GET, boolean $credentials = Genetsis\core\Request::NOT_SECURED, array $http_headers = array(), array $cookies = array() )

Parameters

$url
Endpoint where the request is sent. Without params.
$parameters
mixed Associative vector with request params. Use key as param name, and value as value. The values shouldn't be prepared.
$http_method

string HTTP method. One of them: - self::HTTP_GET - self::HTTP_POST - self::HTTP_METHOD_HEAD - self::HTTP_METHOD_PUT - self::HTTP_METHOD_DELETE

$credentials
If true, client_id and client_secret are included in params
$http_headers
A vector of strings with HTTP headers or FALSE if no additional headers to sent.
$cookies
A vector of strings with cookie data or FALSE if no cookies to sent. One line per cookie ("key=value"), without trailing semicolon.

Returns

array

An associative array with that items: - result: An string or array on success, or FALSE if there is no result. - code: HTTP code. - content-type: Content-type related to result

Throws

Exception
If there is an error.
Constants summary
string HTTP_POST

Http Methods

Http Methods

# 'POST'
string HTTP_PUT
# 'PUT'
string HTTP_GET
# 'GET'
string HTTP_DELETE
# 'DELETE'
string HTTP_HEAD
# 'HEAD'
boolean SECURED
# true
boolean NOT_SECURED
# false
API documentation generated by ApiGen