def _request_uri(self, uri="", method="GET", params={}, headers={}, body=""):
        """Assembles the request uri and calls the request method.

        Required Arguments:
            uri: string - the assembled API endpoint.

        Optional Parameters:
            method: string - the method of the request. Possible values are
                'GET', 'POST', 'DELETE', 'PUT'
            params: dict - parameters to pass along
            headers: dict - any specific http headers
            body: string - request body, only used on a few PUT statements

        Returns:
            typically, JSON - depends on the API call, refer to the other
                method docstrings for more details.
        """
        url = "/".join((self.url_base, self.api_version, uri))

        try:
            lib_version = pkg_resources.require("contextio")[0].version
        except:
            lib_version = "dev"

        headers.update(
            {"user-agent": "contextio/{0}/python-lib-{1}".format(self.api_version, lib_version)})

        if method == "POST":
            params['body'] = body
            response = self.session.request(
                method, url, header_auth=True, data=params, headers=headers)
        else:
            response = self.session.request(
                method, url, header_auth=True, params=params, headers=headers, data=body)

        self._debug(response)
        try:
            response_body = response.json()
        except UnicodeDecodeError:
            response_body = response.content
        except ValueError:
            response_body = response.text

        if response.status_code >= 200 and response.status_code < 300:
            return response_body
        else:
            raise RequestError(
                "Request to {0} failed with HTTP status code {1}: {2}".format(
                    url, response.status_code, response_body), response=response)

    # THE FOLLOWING ROUTES ARE COMMON TO BOTH LITE AND 2.0
dataset/ETHPy150Open contextio/Python-ContextIO/contextio/lib/api.py/Api._request_uri/original