You are here

private function OAuthRequest::getRequestContentType in Lingotek Translation 7.2

Same name and namespace in other branches
  1. 7.3 lib/oauth-php/library/OAuthRequest.php \OAuthRequest::getRequestContentType()

* Fetch the content type of the current request * *

Return value

string

1 call to OAuthRequest::getRequestContentType()
OAuthRequest::__construct in lib/oauth-php/library/OAuthRequest.php
* Construct from the current request. Useful for checking the signature of a request. * When not supplied with any parameters this will use the current request. * *

File

lib/oauth-php/library/OAuthRequest.php, line 726

Class

OAuthRequest
Object to parse an incoming OAuth request or prepare an outgoing OAuth request

Code

private function getRequestContentType() {
  $content_type = 'application/octet-stream';
  if (!empty($_SERVER) && array_key_exists('CONTENT_TYPE', $_SERVER)) {
    list($content_type) = explode(';', $_SERVER['CONTENT_TYPE']);
  }
  return trim($content_type);
}