MCPcopy Create free account
hub / github.com/NoteProtocol/NoteWallet / getHttpClient

Method getHttpClient

src/urchain.ts:16–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14 }
15
16 async getHttpClient() {
17 if (this._httpClient) {
18 return this._httpClient;
19 }
20 this._httpClient = ky.create({
21 timeout: 50000, // Set timeout, wallet requests should not exceed 50 seconds. If they do, it's likely due to poor urchain server design
22 retry: 0,
23 prefixUrl: this._host,
24 headers: {
25 Authorization: `Bearer ${this._apiKey}`,
26 },
27 });
28 return this._httpClient;
29 }
30
31 _parseResponse(data) {
32 return data;

Callers 2

_getMethod · 0.95
_postMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected