import { AxiosResponse } from 'axios';
import { AbpResponse } from '../../models/http/abpResponse';
import { HttpMethod } from './httpMethod';

export interface IHttpCommand<TRequest, TResponse, TError> {
    method: HttpMethod;
    buildEndpoint(): string;
    buildRequestContent(): TRequest;
    transformResponse(rawResponse: AbpResponse<TResponse> | null): TResponse | null;
    handleError(rawResponse: AxiosResponse<AbpResponse<TError>> | null): void;
}