MCPcopy Create free account
hub / github.com/0010aor/FlashNotes / getResponseHeader

Function getResponseHeader

frontend/src/client/core/request.ts:225–236  ·  view source on GitHub ↗
(
  response: AxiosResponse<unknown>,
  responseHeader?: string,
)

Source from the content-addressed store, hash-verified

223}
224
225export const getResponseHeader = (
226 response: AxiosResponse<unknown>,
227 responseHeader?: string,
228): string | undefined => {
229 if (responseHeader) {
230 const content = response.headers[responseHeader]
231 if (isString(content)) {
232 return content
233 }
234 }
235 return undefined
236}
237
238export const getResponseBody = (response: AxiosResponse<unknown>): unknown => {
239 if (response.status !== 204) {

Callers 1

requestFunction · 0.85

Calls 1

isStringFunction · 0.85

Tested by

no test coverage detected