Fix empty query paramter value in editor will generate url params without equal sign issue

This commit is contained in:
Kent Wang
2024-09-19 17:06:20 +08:00
committed by GitHub
parent f3f5f7426c
commit d87398f237

View File

@@ -652,7 +652,7 @@ export const responseTransform = async (patch: ResponsePatch, environmentId: str
};
export const transformUrl = (url: string, params: RequestParameter[], authentication: RequestAuthentication, shouldEncode: boolean) => {
const authQueryParam = getAuthQueryParams(authentication);
const customUrl = joinUrlAndQueryString(url, buildQueryStringFromParams(authQueryParam ? params.concat([authQueryParam]) : params));
const customUrl = joinUrlAndQueryString(url, buildQueryStringFromParams(authQueryParam ? params.concat([authQueryParam]) : params, true, { strictNullHandling: true }));
const isUnixSocket = customUrl.match(/https?:\/\/unix:\//);
if (!isUnixSocket) {
return { finalUrl: smartEncodeUrl(customUrl, shouldEncode, { strictNullHandling: true }) };