public function setCurlOption(int $optionName, $optionValue): RequestContext
    {
        if (@curl_setopt(curl_init(), $optionName, $optionValue)) {
            $this->curlOptions[$optionName] = $optionValue;
        } else {
            throw new RequestContextException(
                "Curl option is invalid: '$optionName' => " . var_export($optionValue, true)
            );
        }

        return $this;
    }
public function setCurlOption(int $optionName, $optionValue): RequestContext
    {
        if (@curl_setopt(curl_init(), $optionName, $optionValue)) {
            $this->curlOptions[$optionName] = $optionValue;
        } else {
            throw new RequestContextException(
                "Curl option is invalid: '$optionName' => " . var_export($optionValue, true)
            );
        }

        return $this;
    }
public function setCurlOption ( int $ optionName , $ optionValue ) : RequestContext { if ( @ curl_setopt ( curl_init ( ) , $ optionName , $ optionValue ) ) { $ this -> curlOptions [ $ optionName ] = $ optionValue ; } else { throw new RequestContextException ( "Curl option is invalid: '$optionName' => " . var_export ( $ optionValue , true ) ) ; } return $ this ; }
Set a single CURL option for context

@param int $optionName
@param mixed $optionValue

@throws RequestContextException

@return RequestContext
Set a single CURL option for context