MCPcopy Create free account
hub / github.com/DemonMartin/tlsClient / convertBody

Method convertBody

src/index.ts:625–630  ·  view source on GitHub ↗
(body: RequestBody)

Source from the content-addressed store, hash-verified

623 }
624
625 private convertBody(body: RequestBody): string | null {
626 if (body === null || body === undefined) return null;
627 if (typeof body === 'string') return body;
628 if (typeof body === 'object') return JSON.stringify(body);
629 return String(body);
630 }
631
632 private convertUrl(url: URL | string): string {
633 return url instanceof URL ? url.toString() : url;

Callers 3

postMethod · 0.95
putMethod · 0.95
patchMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected