ketting
Version:
Opinionated HATEOAS / Rest client.
17 lines (16 loc) • 656 B
TypeScript
import { Links } from '../link.js';
/**
* Takes a Content-Type header, and only returns the mime-type part.
*/
export declare function parseContentType(contentType: string | null): string | null;
export declare function parseLink(context: string, header: string | null): Links;
export declare function isSafeMethod(method: string): boolean;
/**
* Older HTTP versions calls these 'entity headers'.
*
* Never HTTP/1.1 specs calls some of these 'representation headers'.
*
* What they have in common is that these headers can exist on request and
* response and say something *about* the content.
*/
export declare const entityHeaderNames: string[];