"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "helpers/codegen/codegen.ts" between
hoppscotch-2.0.0.tar.gz and hoppscotch-2.1.0.tar.gz

About: Hoppscotch is a light-weight, web based API development suite.

codegen.ts  (hoppscotch-2.0.0):codegen.ts  (hoppscotch-2.1.0)
skipping to change at line 145 skipping to change at line 145
| "queryString" | "queryString"
| "pathName" | "pathName"
| "params" | "params"
| "headers" | "headers"
> { > {
const urlObj = new URL(request.effectiveFinalURL) const urlObj = new URL(request.effectiveFinalURL)
request.effectiveFinalParams.forEach(({ key, value }) => { request.effectiveFinalParams.forEach(({ key, value }) => {
urlObj.searchParams.append(key, value) urlObj.searchParams.append(key, value)
}) })
// Remove authorization headers if auth is specified (because see #1798)
const finalHeaders =
request.auth.authActive && request.auth.authType !== "none"
? request.effectiveFinalHeaders
.filter((x) => x.key.toLowerCase() !== "authorization")
.map((x) => ({ ...x, active: true }))
: request.effectiveFinalHeaders.map((x) => ({ ...x, active: true }))
return { return {
name: request.name, name: request.name,
uri: request.effectiveFinalURL, uri: request.effectiveFinalURL,
headers: request.effectiveFinalHeaders.map((x) => ({ ...x, active: true })), headers: finalHeaders,
params: request.effectiveFinalParams.map((x) => ({ ...x, active: true })), params: request.effectiveFinalParams.map((x) => ({ ...x, active: true })),
method: request.method, method: request.method,
url: urlObj.origin, url: urlObj.origin,
queryString: urlObj.searchParams.toString(), queryString: `${urlObj.searchParams}`,
pathName: urlObj.pathname, pathName: urlObj.pathname,
} }
} }
function getCodegenReqBodyData( function getCodegenReqBodyData(
request: EffectiveHoppRESTRequest request: EffectiveHoppRESTRequest
): Pick< ): Pick<
HoppCodegenContext, HoppCodegenContext,
"rawRequestBody" | "rawInput" | "contentType" | "bodyParams" | "rawParams" "rawRequestBody" | "rawInput" | "contentType" | "bodyParams" | "rawParams"
> { > {
 End of changes. 3 change blocks. 
2 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)