src/Oauth.php
public function getOauthRequest(array $params, $httpMethod, $baseUrl, $endPoint) : string
	{
		$signatureParams = array_merge($params, $this->getOauthParams());
		$signatureParams['oauth_signature'] = $this->getOauthSignature($signatureParams, $httpMethod, $baseUrl . $endPoint);

		$contentParams = [];
		foreach ($params as $key => $param) {
			$contentParams[] = $key . '=' . rawurlencode($param);
		}

		$content = implode('&', $contentParams);

		return $httpMethod . " " . $endPoint . " HTTP/1.1\r\n"
		."Accept: */*\r\n"
		."Connection: close\r\n"
		."User-Agent: Callisto API\r\n"
		."Content-Type: application/x-www-form-urlencoded\r\n"
		."Authorization: OAuth realm=\"\",oauth_consumer_key=\"" . $signatureParams['oauth_consumer_key'] . "\","
		."oauth_nonce=\"" . $signatureParams['oauth_nonce'] . "\","
		."oauth_signature_method=\"" . $signatureParams['oauth_signature_method'] . "\","
		."oauth_timestamp=\"" . $signatureParams['oauth_timestamp'] . "\","
		."oauth_version=\"" . $signatureParams['oauth_version'] . "\","
		."oauth_token=\"" . $signatureParams['oauth_token'] . "\","
		."oauth_signature=\"" . rawurlencode($signatureParams['oauth_signature']) . "\"\r\n"
		."Content-Length: " . strlen($content) . "\r\n"
		."Host: stream.twitter.com:443\r\n\r\n"
		.$content;
	}
public function getOauthRequest(array $params, $httpMethod, $baseUrl, $endPoint) : string
	{
		$signatureParams = array_merge($params, $this->getOauthParams());
		$signatureParams['oauth_signature'] = $this->getOauthSignature($signatureParams, $httpMethod, $baseUrl . $endPoint);

		$contentParams = [];
		foreach ($params as $key => $param) {
			$contentParams[] = $key . '=' . rawurlencode($param);
		}

		$content = implode('&', $contentParams);

		return $httpMethod . " " . $endPoint . " HTTP/1.1\r\n"
		."Accept: */*\r\n"
		."Connection: close\r\n"
		."User-Agent: Callisto API\r\n"
		."Content-Type: application/x-www-form-urlencoded\r\n"
		."Authorization: OAuth realm=\"\",oauth_consumer_key=\"" . $signatureParams['oauth_consumer_key'] . "\","
		."oauth_nonce=\"" . $signatureParams['oauth_nonce'] . "\","
		."oauth_signature_method=\"" . $signatureParams['oauth_signature_method'] . "\","
		."oauth_timestamp=\"" . $signatureParams['oauth_timestamp'] . "\","
		."oauth_version=\"" . $signatureParams['oauth_version'] . "\","
		."oauth_token=\"" . $signatureParams['oauth_token'] . "\","
		."oauth_signature=\"" . rawurlencode($signatureParams['oauth_signature']) . "\"\r\n"
		."Content-Length: " . strlen($content) . "\r\n"
		."Host: stream.twitter.com:443\r\n\r\n"
		.$content;
	}
Generates the HTTP request string.

@param array $params
@param $httpMethod
@param $baseUrl
@param $endPoint
@return string