def _request(self, method, url, body):
if method != '<STR_LIT:POST>' and method != '<STR_LIT>':<EOL><INDENT>body = None<EOL><DEDENT>s = Session()<EOL>LOGGER.debug(<EOL>'<STR_LIT>'.format(method, url, body))<EOL>req = Request(method, url, json=body)<EOL>prepped = s.prepare_request(req)<EOL>res = s.send(prepped, timeout=self._timeout or None)<EOL>res.raise_for_status()<EOL>return res.json()<EOL>
Internal method to send request to the remote server.

        Args:
            method(str): HTTP Method(GET/POST/PUT/DELET/HEAD).
            url(str): The request url.
            body(dict): The JSON object to be sent.

        Returns:
            A dict represent the json body from server response.

        Raises:
            ConnectionError: Meet network problem (e.g. DNS failure,
                refused connection, etc).
            Timeout: A request times out.
            HTTPError: HTTP request returned an unsuccessful status code.