Skip to main content

index/functions/buildRequestHeaders.md

buildRequestHeaders(wire, parts?): Record<string, string>

The request headers for ANY SDK request, GET or POST, from one place so the wire options reach every request alike. Order, which is the order the requestor sees them in: User-Agent (wire.userAgent, default GalaChain-SDK/<version>, false omits it), parts.defaults, wire.headers, Content-Type (JSON bodies only), parts.fixed. A later entry replaces an earlier one of the same name regardless of case, so a header is never sent twice.

Parameters​

ParameterType
wireWireOptions | undefined
parts?RequestHeaderParts

Returns​

Record<string, string>