Skip to content
Commit fb07b5cf authored by Igor Ponomarev's avatar Igor Ponomarev Committed by Nejc Habjan
Browse files

feat(api): Add argument that appends extra HTTP headers to a request

Currently the only way to manipulate the headers for a request
is to use `Gitlab.headers` attribute. However, this makes it
very concurrently unsafe because the `Gitlab` object can be shared
between multiple requests at the same time.

Instead add a new keyword argument `extra_headers` which will update
the headers dictionary with new values just before the request is sent.

For example, this can be used to download a part of a artifacts file
using the `Range` header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests



Signed-off-by: default avatarIgor Ponomarev <igor.ponomarev@collabora.com>
parent e4673d8a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment