Skip to content

Commit

Permalink
Merge pull request #1269 from danielpeintner/issue-1268
Browse files Browse the repository at this point in the history
refactor: use the same agent etc for requestThingDescription as with …
  • Loading branch information
relu91 committed Apr 24, 2024
2 parents c000311 + 23d700b commit 786fde6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/binding-http/src/http-client-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ export default class HttpClient implements ProtocolClient {
const headers: HeadersInit = {
Accept: "application/td+json",
};
const response = await fetch(uri, { headers });
const request = await this.generateFetchRequest({ href: uri }, "GET", headers);
const response = await this.fetch(request);
const body = ProtocolHelpers.toNodeStream(response.body as Readable);
return new Content(response.headers.get("content-type") ?? "application/td+json", body);
}
Expand Down

0 comments on commit 786fde6

Please sign in to comment.