def _request(self, path, key, data, method, key_is_cik, extra_headers={}):
if method == '<STR_LIT:GET>':<EOL><INDENT>if len(data) > <NUM_LIT:0>:<EOL><INDENT>url = path + '<STR_LIT:?>' + data<EOL><DEDENT>else:<EOL><INDENT>url = path<EOL><DEDENT>body = None<EOL><DEDENT>else:<EOL><INDENT>url = path<EOL>body = data<EOL><DEDENT>headers = {}<EOL>if key_is_cik:<EOL><INDENT>headers['<STR_LIT>'] = key<EOL><DEDENT>else:<EOL><INDENT>headers['<STR_LIT>'] = key<EOL><DEDENT>if method == '<STR_LIT:POST>':<EOL><INDENT>headers['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL><DEDENT>headers['<STR_LIT>'] = '<STR_LIT>'<EOL>headers.update(extra_headers)<EOL>body, response = self._onephttp.request(method,<EOL>url,<EOL>body,<EOL>headers)<EOL>pr = ProvisionResponse(body, response)<EOL>if self._raise_api_exceptions and not pr.isok:<EOL><INDENT>raise ProvisionException(pr)<EOL><DEDENT>return pr<EOL>
Generically shared HTTP request method.

        Args:
            path: The API endpoint to interact with.
            key: A string for the key used by the device for the API.  Either a CIK or token.
            data: A string for the pre-encoded data to be sent with this request.
            method: A string denoting the HTTP verb to use for the request (e.g. 'GET', 'POST')
            key_is_cik: Whether or not the device key used is a CIK or token.
            extra_headers: A dictionary of extra headers to include with the request.

        Returns:
            A ProvisionResponse containing the result of the HTTP request.