mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-01-25 16:04:01 +00:00
fix: #227 Fixing array syntax thanks to [Lukas Eipert](https://github.com/leipert)
This commit is contained in:
parent
1e5146c770
commit
f9bc34dcb5
747
package-lock.json
generated
747
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -48,6 +48,7 @@
|
|||||||
"got": "^9.2.2",
|
"got": "^9.2.2",
|
||||||
"humps": "^2.0.1",
|
"humps": "^2.0.1",
|
||||||
"ky": "^0.4.1",
|
"ky": "^0.4.1",
|
||||||
|
"query-string": "^6.2.0",
|
||||||
"randomstring": "^1.1.5"
|
"randomstring": "^1.1.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import Request from 'got';
|
import Request from 'got';
|
||||||
import { decamelizeKeys } from 'humps';
|
import { decamelizeKeys } from 'humps';
|
||||||
|
import { stringify } from 'query-string';
|
||||||
|
|
||||||
interface GetPaginatedOptions {
|
interface GetPaginatedOptions {
|
||||||
showPagination?: boolean;
|
showPagination?: boolean;
|
||||||
@ -12,7 +13,7 @@ function defaultRequest(service, endpoint, { body, query }: { body?: Object, que
|
|||||||
[service.url, endpoint].join('/'),
|
[service.url, endpoint].join('/'),
|
||||||
{
|
{
|
||||||
headers: service.headers,
|
headers: service.headers,
|
||||||
query: query && decamelizeKeys(query),
|
query: query && stringify(decamelizeKeys(query), { arrayFormat: 'bracket' }),
|
||||||
body: body && decamelizeKeys(body),
|
body: body && decamelizeKeys(body),
|
||||||
rejectUnauthorized: service.rejectUnauthorized,
|
rejectUnauthorized: service.rejectUnauthorized,
|
||||||
json: true,
|
json: true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user