['content-type' => MimeType::M_POST], ]; if ($method === RequestMethod::POST) { $options['body'] = $this->getAccessTokenBody($params); } return $options; } protected function getAccessTokenBody(array $params) : string { return \http_build_query($params, null, '&', \PHP_QUERY_RFC3986); } }