:type uri_relative: str
        :type params: dict[str, str]
        :type custom_headers: dict[str, str]

        :rtype: BunqResponseRaw
507672
def get(self, uri_relative, params, custom_headers):
        

        return self._request(
            self._METHOD_GET,
            uri_relative,
            self._BYTES_EMPTY,
            params,
            custom_headers
        )
395367
def relative_ref(self, baseURI):
        
        # workaround for posixpath bug in 2.6, doesn't generate correct
        # relative path when *start* (second) parameter is root ('/')
        if baseURI == '/':
            relpath = self[1:]
        else:
            relpath = posixpath.relpath(self, baseURI)
        return relpath
1304703
private ModuleFields loadAuth(URI relativeURI, String httpMethod) {

        ModuleFields authFields = new ModuleFields();

        for (PipeModule module : modules) {
            ModuleFields moduleFields = module.loadModule(relativeURI, httpMethod, new byte[] {});
            if (!moduleFields.getHeaders().isEmpty()) {
                for (Pair<String, String> header : moduleFields.getHeaders()) {
                    authFields.addHeader(header.first, header.second);
                }
            }

            if (!moduleFields.getQueryParameters().isEmpty()) {
                for (Pair<String, String> header : moduleFields.getQueryParameters()) {
                    authFields.addQueryParameter(header.first, header.second);
                }
            }

        }

        return authFields;

    }
1032218
def api_related(self, query):
        '''
        
        '''

        url = "{0}/{1}/related/?format=json".format(self.base_url, query)
        response = requests.get(url, headers=self.headers, verify=self.verify_ssl)

        if response.status_code == 200:
            return response.json()
        else:
            self.error('Received status code: {0} from Soltra Server. Content:\n{1}'.format(
                response.status_code, response.text)
            )
124247
def head(self, url, *args, **kwargs):
        
        res = self._conn.head(url, headers=self._prepare_headers(**kwargs))
        if res.status_code == 200:
            return res
        return None
844399
def set_response_headers(self, request, total_count):
        '''
        
        '''
        response = request.response
        response.headerlist.append(('Access-Control-Expose-Headers', 'Content-Range, X-Content-Range'))
        response.accept_ranges = 'items'
        if total_count is None:
            raise RangeParseException('Provided length value is null')
        if total_count > 0:
            response.content_range = self.content_range(total_count)

        self.set_link_headers(request, total_count)
714817
def _get_resource(self, relative_url, params=None):
        
        response = self._get(relative_url, params=params, raise_for_status=False)
        if response.status_code == 404:
            return None
        self._raise_for_status(response)
        return response.json()
138391
def prepare_request_uri_query(oauth_params, uri):
    
    # append OAuth params to the existing set of query components
    sch, net, path, par, query, fra = urlparse(uri)
    query = urlencode(
        _append_params(oauth_params, extract_params(query) or []))
    return urlunparse((sch, net, path, par, query, fra))
777664
def request_uri=(new_request_uri)
      if !new_request_uri.respond_to?(:to_str)
        raise TypeError, "Can't convert #{new_request_uri.class} into String."
      end
      if self.absolute? && self.scheme !~ /^https?$/i
        raise InvalidURIError,
          "Cannot set an HTTP request URI for a non-HTTP URI."
      end
      new_request_uri = new_request_uri.to_str
      path_component = new_request_uri[/^([^\?]*)\??(?:.*)$/, 1]
      query_component = new_request_uri[/^(?:[^\?]*)\?(.*)$/, 1]
      path_component = path_component.to_s
      path_component = (!path_component.empty? ? path_component : SLASH)
      self.path = path_component
      self.query = query_component

      # Reset dependent values
      remove_composite_values
    end
848319
def _request(self, method, uri_relative, request_bytes, params,
                 custom_headers):
        

        uri_relative_with_params = self._append_params_to_uri(uri_relative,
                                                              params)
        if uri_relative not in self._URIS_NOT_REQUIRING_ACTIVE_SESSION:
            if self._api_context.ensure_session_active():
                from bunq.sdk.context import BunqContext

                BunqContext.update_api_context(self._api_context)

        all_headers = self._get_all_headers(
            method,
            uri_relative_with_params,
            request_bytes,
            custom_headers
        )

        response = requests.request(
            method,
            self._get_uri_full(uri_relative_with_params),
            data=request_bytes,
            headers=all_headers,
            proxies={self._FIELD_PROXY_HTTPS: self._api_context.proxy_url},
        )

        self._assert_response_success(response)

        if self._api_context.installation_context is not None:
            security.validate_response(
                self._api_context.installation_context.public_key_server,
                response.status_code,
                response.content,
                response.headers
            )

        return self._create_bunq_response_raw(response)
348106
def canonical_headers
      hash = headers.dup
      hash["host"] ||= Addressable::URI.parse(url).host
      hash = hash.map{|name,value| [name.downcase,value]}
      hash.reject!{|name,value| name == "authorization"}
      hash.sort
    end
503770
def get_wsgi_request_object(curr_request, method, url, headers, body):
    '''
        
    '''
    x_headers = headers_to_include_from_request(curr_request)
    method, t_headers = pre_process_method_headers(method, headers)

    # Add default content type.
    if "CONTENT_TYPE" not in t_headers:
        t_headers.update({"CONTENT_TYPE": _settings.DEFAULT_CONTENT_TYPE})

    # Override existing batch requests headers with the new headers passed for this request.
    x_headers.update(t_headers)

    content_type = x_headers.get("CONTENT_TYPE", _settings.DEFAULT_CONTENT_TYPE)

    # Get hold of request factory to construct the request.
    _request_factory = BatchRequestFactory()
    _request_provider = getattr(_request_factory, method)

    secure = _settings.USE_HTTPS

    request = _request_provider(url, data=body, secure=secure,
                                content_type=content_type, **x_headers)

    return request
542956
def get_header_url(response, header_name):
    
    url = response.headers.get(header_name)
    try:
        _validate(url)
    except ValueError:
        return None
    else:
        return url
265251
def _relative_uris(self, uri_list):
        

        return [u for u in (self._relative(uri) for uri in uri_list) if u]
217193
def put(self, uri_relative, request_bytes, custom_headers):
        

        return self._request(
            self._METHOD_PUT,
            uri_relative,
            request_bytes,
            {},
            custom_headers
        )
800403
function resolveUrl(headers, relativeURL) {
	var path = headers[":path"] || "";
	var baseUri = headers[":scheme"] + "://" + headers[":authority"] + path;

	var outURL;
	if (relativeURL && !fullUrlExp.test(relativeURL) ) {
		outURL = url.resolve(baseUri, relativeURL);
	} else {
		outURL = relativeURL;
	}
	return outURL;
}
896360
def get(self, uri, params={}):
        '''
        '''
        return self._session.get(urljoin(Investigate.BASE_URL, uri),
            params=params, headers=self._auth_header, proxies=self.proxies
        )