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.

Differences Between: [Versions 400 and 401]

(no description)

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

Defines 1 class


Class: http_client_test  - X-Ref

Tests for the http_client class.

test_client_get_request()   X-Ref
Verify the http_client delegates to curl during a "GET" request.


test_client_post_request()   X-Ref
Verify the http_client delegates to curl during a "POST" request.


test_request_unsupported_method(string $httpmethod)   X-Ref
Test a few of the unsupported HTTP methods.

param: string $httpmethod the http method.

unsupported_methods_provider()   X-Ref
Data provider for testing unsupported http methods.

return: array the test case data.

test_header_parsing()   X-Ref
Verify that the response headers are properly read from curl, and exclude things like redirect headers, or 100-continues.