UNPKG

@aws-sdk/core

Version:

Core functions & classes shared by multiple AWS SDK clients.

4 lines (3 loc) • 338 B
import { HttpResponse } from "@smithy/core/protocols"; export const getDateHeader = (response) => HttpResponse.isInstance(response) ? (response.headers?.date ?? response.headers?.Date) : undefined; export const getAgeHeader = (response) => HttpResponse.isInstance(response) ? (response.headers?.age ?? response.headers?.Age) : undefined;