Skip to content

Commit 8e8a53c

Browse files
committedAug 27, 2020
working default typescript client
1 parent f61f1b9 commit 8e8a53c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎otohttp/templates/client.ts.plush

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ export class Client {
2727
const headers: HeadersInit = new Headers();
2828
headers.set('Accept', 'application/json');
2929
headers.set('Content-Type', 'application/json');
30-
await this.client.headers(headers);
30+
if (this.client.headers) {
31+
await this.client.headers(headers);
32+
}
3133
const response = await fetch(this.client.basepath + '<%= service.Name %>.<%= method.Name %>', {
3234
method: 'POST',
3335
headers: headers,

0 commit comments

Comments
 (0)
Please sign in to comment.