Пример #1
0
 /**
  * @inheritdoc
  */
 protected function getContentType(ResponseInterface $response)
 {
     $type = parent::getContentType($response);
     // Fix for Facebook's pseudo-JSONP support
     if (strpos($type, 'javascript') !== false) {
         return 'application/json';
     }
     // Fix for Facebook's pseudo-urlencoded support
     if (strpos($type, 'plain') !== false) {
         return 'application/x-www-form-urlencoded';
     }
     return $type;
 }
Пример #2
0
 /**
  * @inheritdoc
  */
 protected function getContentType(\Psr\Http\Message\ResponseInterface $response)
 {
     return parent::getContentType($response);
 }