:type uri_relative: str
        :type request_bytes: bytes
        :type custom_headers: dict[str, str]

        :return: BunqResponseRaw
488123
def post(self, uri_relative, request_bytes, custom_headers):
        

        return self._request(
            self._METHOD_POST,
            uri_relative,
            request_bytes,
            {},
            custom_headers
        )
1345437
def _http_request(self, api, data, headers=None):
        
        if not headers:
            headers = {'Content-Type': 'application/json'}
        if not self._token_valid:
            self._token = self.get_token(self._app_name, self._username, self._password)
        response = requests.post(self._base_url + '/' + api, data=json.dumps(data),
                                 headers=headers)
        # raise an exception if the status was not 200
        logger.debug(json.dumps(data))
        logger.debug(response.text)
        response.raise_for_status()
        return response
305731
def request(self, url, extra_headers=None, params=None):
        ''
        if not url.startswith('http'):
            # relative url
            url = self.rootpath + url
        log.debug("getting url: %r, extra_headers=%r, params=%r", url, extra_headers, params)
        if extra_headers is None: extra_headers={}
        r = self.session.get(url, headers=extra_headers, params=params, timeout=1800) #max retries is set in __init__

        if r.status_code in ( 500, ):
            raise JFSError(r.reason)
        return r
1042
def get_request(request_url, request_headers=dict()):
    
    request = Request(request_url)
    for key, val in request_headers.items():
        request.add_header(key, val)

    try:
        response = urlopen(request, timeout=_REQUEST_TIMEOUT)
        response_content = response.read()
    except (HTTPError, URLError, socket.timeout):
        response_content = None

    return response_content
1300346
def list_available_request_headers(custom_headers:nil)
      response = list_available_request_headers_async(custom_headers:custom_headers).value!
      response.body unless response.nil?
    end
431373
public static final String getRelativeURI( HttpServletRequest request, String uri )
    {
        return getRelativeURI( request.getContextPath(), uri );
    }
440384
async def _request(self, method: str, url: str, headers: Mapping[str, str],
                       body: bytes = b'') -> Tuple[int, Mapping[str, str], bytes]:
        """"""
156036
def open_relative(self, url, *args, **kwargs):
        
        return self.open(self.absolute_url(url), *args, **kwargs)
278551
def _fetch(self, uri, sub_domain=False):
        
        url = self._build_request_url(uri, sub_domain=sub_domain)

        try:
            res = self.request_handler.send("HEAD", url=url, allow_redirects=self.follow_redirects)
            if res.status_code not in self.ignored_error_codes:
                self._log_response(res.status_code, url, res.headers)
        except (AttributeError, RequestHandlerException):
            # res is None or another error occurred
            pass
265251
def _relative_uris(self, uri_list):
        

        return [u for u in (self._relative(uri) for uri in uri_list) if u]
1272004
def _urllib_send(opener, req, **kwargs):
    """"""
    if req.content and not any(h.lower() == 'content-type'
                               for h in req.headers):
        req = req.with_headers({'Content-Type': 'application/octet-stream'})
    url = req.url + '?' + urlencode(req.params)
    raw_req = urllib_request.Request(url, req.content, headers=req.headers)
    set_urllib_method(raw_req, req.method)
    try:
        res = opener.open(raw_req, **kwargs)
    except urllib_http_error_cls as http_err:
        res = http_err
    return Response(res.getcode(), content=res.read(), headers=res.headers)
212797
def relative_to(self, *other):
        
        obj = super(ArtifactoryPath, self).relative_to(*other)
        obj.auth = self.auth
        obj.verify = self.verify
        obj.cert = self.cert
        return obj
690458
def list(cls, params=None, custom_headers=None):
        

        if params is None:
            params = {}

        if custom_headers is None:
            custom_headers = {}

        api_client = client.ApiClient(cls._get_api_context())
        endpoint_url = cls._ENDPOINT_URL_LISTING
        response_raw = api_client.get(endpoint_url, params, custom_headers)

        return BunqResponseUserList.cast_from_bunq_response(
            cls._from_json_list(response_raw)
        )
1321277
def request(method, uri, *args, **kwargs):
    
    req_method = req_methods[method.upper()]
    raise_exception = kwargs.pop("raise_exception", True)
    raw_content = kwargs.pop("raw_content", False)
    kwargs["headers"] = kwargs.get("headers", {})
    http_log_req(method, uri, args, kwargs)
    data = None
    if "data" in kwargs:
        # The 'data' kwarg is used when you don't want json encoding.
        data = kwargs.pop("data")
    elif "body" in kwargs:
        if "Content-Type" not in kwargs["headers"]:
            kwargs["headers"]["Content-Type"] = "application/json"
        data = json.dumps(kwargs.pop("body"))
    if data:
        resp = req_method(uri, data=data, **kwargs)
    else:
        resp = req_method(uri, **kwargs)
    if raw_content:
        body = resp.content
    else:
        try:
            body = resp.json()
        except ValueError:
            # No JSON in response
            body = resp.content
    http_log_resp(resp, body)
    if resp.status_code >= 400 and raise_exception:
        raise exc.from_response(resp, body)
    return resp, body
13361
def headers_to_include_from_request(curr_request):
    '''
        
    '''
    return {
        h: v for h, v in curr_request.META.items() if h in _settings.HEADERS_TO_INCLUDE}
291823
async def probeUrl(self, url, response_headers=None):
    
    self.logger.debug("Probing URL '%s'..." % (url))
    headers = {}
    self.updateHttpHeaders(headers)
    resp_headers = {}
    resp_ok = await self.http.isReachable(url,
                                          headers=headers,
                                          response_headers=resp_headers,
                                          cache=__class__.probe_cache)

    if response_headers is not None:
      response_headers.update(resp_headers)

    return resp_ok
1338339
def modify_request(self, http_request=None):
    """"""
    if http_request is None:
      http_request = HttpRequest()
    if http_request.uri is None:
      http_request.uri = Uri()
    # Determine the correct scheme.
    if self.scheme:
      http_request.uri.scheme = self.scheme
    if self.port:
      http_request.uri.port = self.port
    if self.host:
      http_request.uri.host = self.host
    # Set the relative uri path
    if self.path:
      http_request.uri.path = self.path
    if self.query:
      http_request.uri.query = self.query.copy()
    return http_request