ketting
Version:
Opiniated HATEAOS / Rest client.
20 lines (19 loc) • 561 B
TypeScript
import { BaseState } from './base-state';
/**
* Represents a resource state in the Siren format
*/
export declare class SirenState<T> extends BaseState<T> {
/**
* Returns a serialization of the state that can be used in a HTTP
* response.
*
* For example, a JSON object might simply serialize using
* JSON.serialize().
*/
serializeBody(): string;
clone(): SirenState<T>;
}
/**
* Turns a HTTP response into a SirenState
*/
export declare const factory: (uri: string, response: Response) => Promise<SirenState<any>>;