php8.5
Home/ Manual/ oauth / oauth/ OAuth::setRequestEngine

OAuth::setRequestEngine

PHP function Edit on GitHub ✎

(PECL OAuth >= 1.0.0)

The setRequestEngine purpose

Description

OAuth::setRequestEngine(int $reqengine): void

Sets the Request Engine, that will be sending the HTTP requests.

Func

Parameters

reqengine

The desired request engine. Set to OAUTH_REQENGINE_STREAMS to use PHP Streams, or OAUTH_REQENGINE_CURL to use Curl.

Return Values

Void

Errors/Exceptions

Emits an OAuthException exception if an invalid request engine is chosen.

Examples

OAuth::setRequestEngine() example

php
<?php
$consumer = new OAuth();

$consumer->setRequestEngine(OAUTH_REQENGINE_STREAMS);
?>

See Also

Source: reference/oauth/oauth/setrequestengine.xml · from the official PHP manual (php/doc-en)