Remove requestOptions2GotOptions compatibility layer (#7270)

* gzip --> decompress

* strictSSL --> https.rejectUnauthorized

* auth --> username/password

* qs --> searchParams

* fix base service auth docs

* completely remove requestOptions2GotOptions layer

* update the docs

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This commit is contained in:
chris48s
2021-11-15 19:56:08 +00:00
committed by GitHub
parent 42b0033bc8
commit c73072deed
99 changed files with 204 additions and 254 deletions

View File

@@ -20,7 +20,7 @@ export default class GitLabBase extends BaseJsonService {
async fetchPage({ page, requestParams, schema }) {
const { res, buffer } = await this._request({
...requestParams,
...{ options: { qs: { page } } },
...{ options: { searchParams: { page } } },
})
const json = this._parseJson(buffer)
@@ -39,7 +39,7 @@ export default class GitLabBase extends BaseJsonService {
url,
options: {
headers: { Accept: 'application/json' },
qs: { per_page: 100 },
searchParams: { per_page: 100 },
...options,
},
errorMessages,

View File

@@ -106,7 +106,7 @@ export default class GitLabRelease extends GitLabBase {
404: 'project not found',
},
options: {
qs: { order_by: orderBy },
searchParams: { order_by: orderBy },
},
firstPageOnly: !isSemver,
})

View File

@@ -95,7 +95,7 @@ export default class GitlabTag extends GitLabBase {
url: `${baseUrl}/api/v4/projects/${encodeURIComponent(
project
)}/repository/tags`,
options: { qs: { order_by: 'updated' } },
options: { searchParams: { order_by: 'updated' } },
errorMessages: {
404: 'repo not found',
},