You are here

private function LingotekOAuthRequest::getRequestContentType in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 7.7 lib/oauth-php/library/LingotekOAuthRequest.php \LingotekOAuthRequest::getRequestContentType()
  2. 7.4 lib/oauth-php/library/LingotekOAuthRequest.php \LingotekOAuthRequest::getRequestContentType()
  3. 7.5 lib/oauth-php/library/LingotekOAuthRequest.php \LingotekOAuthRequest::getRequestContentType()

* Fetch the content type of the current request * *

Return value

string

1 call to LingotekOAuthRequest::getRequestContentType()
LingotekOAuthRequest::__construct in lib/oauth-php/library/LingotekOAuthRequest.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/LingotekOAuthRequest.php, line 726

Class

LingotekOAuthRequest
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);
}