This commit is contained in:
Steve Faulkner
2020-07-23 19:03:43 -05:00
parent ad115a2cce
commit ee6f635458

View File

@@ -207,7 +207,7 @@ async function main() {
${bodyParam(bodyParameter, "Types")} ${bodyParam(bodyParameter, "Types")}
) : Promise<${responseType(operation, "Types")}> { ) : Promise<${responseType(operation, "Types")}> {
const path = \`${path.replace(/{/g, "${")}\` const path = \`${path.replace(/{/g, "${")}\`
return window.fetch(this.baseUrl + this.basePath + path, { method: "${method}", ${ return window.fetch(this.baseUrl + path, { method: "${method}", ${
bodyParameter ? "body: JSON.stringify(body)" : "" bodyParameter ? "body: JSON.stringify(body)" : ""
} }).then((response) => response.json()) } }).then((response) => response.json())
} }