Skip to content

Commit c0e80bb

Browse files
committed
Update sendRequest.hbs
1 parent ae9987b commit c0e80bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/templates/core/axios/sendRequest.hbs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ async function sendRequest(
88
openApiConfig: OpenAPIConfig
99
): Promise<AxiosResponse<any>> {
1010
const source = axios.CancelToken.source();
11+
const newUrl = openApiConfig.EDGE ? url.replace("{edge}", openApiConfig.EDGE) : url;
1112

1213
const config: AxiosRequestConfig = {
13-
url: url.replace("{edge}", openApiConfig.EDGE),
14+
url: newUrl,
1415
headers,
1516
data: body || formData,
1617
method: options.method,

0 commit comments

Comments
 (0)