Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

(no description)

File Size: 86 lines (2 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

http_response:: (5 methods):
  __construct()
  parse_payload()
  getBody()
  getHeaders()
  getStatusCode()


Class: http_response  - X-Ref

An implementation of IHTTPResponse, for use with the lib/lti1p3 library code.

__construct(array $payload, int $statuscode)   X-Ref
Constructor.

param: array $payload the array containing the body and headers.
param: int $statuscode the HTTP status code.

parse_payload(array $payload)   X-Ref
Parse the array containing headers and body into instance vars.

param: array $payload

getBody()   X-Ref
Get the HTTP response body string.

return: string the HTTP response body.

getHeaders()   X-Ref
Get the HTTP headers array.

return: array the array containing the headers.

getStatusCode()   X-Ref
Get the HTTP response status code.

return: int the HTTP response status code.