Represents the request and response for a request made to commercetools

interface CommercetoolsRequestResponse {
    request: {
        data?: any;
        headers?: Record<string, string>;
        method: string;
        params?: Record<string, string | number | boolean>;
        url: string;
    };
    response: {
        code?: string;
        data?: any;
        headers?: Record<string, string>;
        message?: string;
        status?: number;
    };
    stats: CommercetoolsRequestResponseStats;
}

Properties

request: {
    data?: any;
    headers?: Record<string, string>;
    method: string;
    params?: Record<string, string | number | boolean>;
    url: string;
}

Type declaration

  • Optional data?: any
  • Optional headers?: Record<string, string>
  • method: string
  • Optional params?: Record<string, string | number | boolean>
  • url: string
response: {
    code?: string;
    data?: any;
    headers?: Record<string, string>;
    message?: string;
    status?: number;
}

Type declaration

  • Optional code?: string
  • Optional data?: any
  • Optional headers?: Record<string, string>
  • Optional message?: string
  • Optional status?: number