e2ed
Version:
E2E testing framework over Playwright
32 lines (31 loc) • 901 B
TypeScript
import { Route } from './Route';
import type { Method, Request, Response, Url } from './types/internal';
/**
* Abstract route for API requests.
*/
export declare abstract class ApiRoute<Params = undefined, SomeRequest extends Request = Request, SomeResponse extends Response = Response> extends Route<Params> {
/**
* Request type of API route.
*/
readonly Request: SomeRequest;
/**
* Response type of API route.
*/
readonly Response: SomeResponse;
/**
* Returns `true`, if the request body is in JSON format.
*/
getIsRequestBodyInJsonFormat(): boolean;
/**
* Returns `true`, if the response body is in JSON format.
*/
getIsResponseBodyInJsonFormat(): boolean;
/**
* Returns the origin of the route.
*/
getOrigin(): Url;
/**
* Get HTTP method of API route.
*/
abstract getMethod(): Method;
}