Skip to content
This repository was archived by the owner on Mar 8, 2023. It is now read-only.

Commit 20266b8

Browse files
committed
Remove headerData
1 parent de22a01 commit 20266b8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2734,7 +2734,7 @@ var fetchRequest = {"compiler":[8,">= 4.3.0"],"main":function(container,depth0,h
27342734
+ ((stack1 = container.invokePartial(lookupProperty(partials,"fetch/getResponseBody"),depth0,{"name":"fetch/getResponseBody","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
27352735
+ "\n\n"
27362736
+ ((stack1 = container.invokePartial(lookupProperty(partials,"functions/catchErrors"),depth0,{"name":"functions/catchErrors","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
2737-
+ "\n\ninterface ApiResultWithHeaders extends ApiResult {\n headers: Headers;\n}\n\n/**\n * Request using fetch client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\nexport async function request(options: ApiRequestOptions): Promise<ApiResultWithHeaders> {\n const url = getUrl(options);\n const response = await sendRequest(options, url);\n const responseBody = await getResponseBody(response);\n\n const result: ApiResultWithHeaders = {\n url,\n ok: response.ok,\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n headers: response.headers,\n };\n\n catchErrors(options, result);\n return result;\n}";
2737+
+ "\n\ninterface ApiResultWithHeaders extends ApiResult {\n headers: Headers;\n}\n\n/**\n * Request using fetch client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\nexport async function request(options: ApiRequestOptions): Promise<ApiResultWithHeaders> {\n const url = getUrl(options);\n const response = await sendRequest(options, url);\n const responseBody = await getResponseBody(response);\n\n const result: ApiResultWithHeaders = {\n url,\n ok: response.ok,\n status: response.status,\n statusText: response.statusText,\n body: responseBody,\n headers: response.headers,\n };\n\n catchErrors(options, result);\n return result;\n}";
27382738
},"usePartial":true,"useData":true};
27392739

27402740
var fetchSendRequest = {"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) {

src/templates/core/fetch/request.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export async function request(options: ApiRequestOptions): Promise<ApiResultWith
6767
ok: response.ok,
6868
status: response.status,
6969
statusText: response.statusText,
70-
body: responseHeader || responseBody,
70+
body: responseBody,
7171
headers: response.headers,
7272
};
7373

0 commit comments

Comments
 (0)