Hierarchy

  • HttpResponse

Constructors

  • Creates a HTTP Response that will be used to mock out network interceptions.

    Parameters

    • Optional urlToIntercept: any

    Returns HttpResponse

Properties

returnBody: string
returnHeaders: any[]
returnMethod: string
returnStatus: number
urlToIntercept: any

Accessors

  • get body(): string
  • Returns string

  • set body(arg): void
  • Sets the value of the body of the HTTP Request that will be returned.

    Parameters

    • arg: string

    Returns void

  • get headers(): {
        name: string;
        value: any;
    }[]
  • Returns {
        name: string;
        value: any;
    }[]

  • get method(): string
  • Returns the Method to be used in the intercept

    Returns string

  • set method(arg): void
  • Sets the method of the HTTP Request

    Parameters

    • arg: string

    Returns void

  • get status(): number
  • Returns number

  • set status(arg): void
  • Set the STATUS value of the returned HTTP Request

    Parameters

    • arg: number

    Returns void

Methods

  • Add headers that will be returned when we intercept a HTTP Request

    Parameters

    • header: string
    • value: any

    Returns void

Generated using TypeDoc