- Notifications
You must be signed in to change notification settings - Fork675
Commitfb07b5c
feat(api): Add argument that appends extra HTTP headers to a request
Currently the only way to manipulate the headers for a requestis to use `Gitlab.headers` attribute. However, this makes itvery concurrently unsafe because the `Gitlab` object can be sharedbetween multiple requests at the same time.Instead add a new keyword argument `extra_headers` which will updatethe headers dictionary with new values just before the request is sent.For example, this can be used to download a part of a artifacts fileusing the `Range` header:https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requestsSigned-off-by: Igor Ponomarev <igor.ponomarev@collabora.com>1 parente4673d8 commitfb07b5c
File tree
4 files changed
+69
-0
lines changed- docs
- gitlab
- tests/unit
- objects
4 files changed
+69
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
| 657 | + | |
657 | 658 | | |
658 | 659 | | |
659 | 660 | | |
| |||
675 | 676 | | |
676 | 677 | | |
677 | 678 | | |
| 679 | + | |
678 | 680 | | |
679 | 681 | | |
680 | 682 | | |
| |||
721 | 723 | | |
722 | 724 | | |
723 | 725 | | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
724 | 729 | | |
725 | 730 | | |
726 | 731 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
38 | 52 | | |
39 | 53 | | |
40 | 54 | | |
| |||
46 | 60 | | |
47 | 61 | | |
48 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
120 | 143 | | |
121 | 144 | | |
122 | 145 | | |
| |||
0 commit comments
Comments
(0)