# Class HttpResponse

#### Hierarchy

- HttpResponse

#####
Index

### Constructors

constructor

### Properties

returnBody
returnHeaders
returnMethod
returnStatus
urlToIntercept

### Accessors

body
headers
method
status

### Methods

addHeaders

## Constructors

### constructor

- new HttpResponse(urlToIntercept?): HttpResponse

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

  #### Parameters

  - ##### `Optional` urlToIntercept: any

  #### Returns HttpResponse

## Properties

### returnBody

returnBody: string

### returnHeaders

returnHeaders: any[]

### returnMethod

returnMethod: string

### returnStatus

returnStatus: number

### urlToIntercept

urlToIntercept: any

## Accessors

### body

- 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

### headers

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

- #### Returns {
  name: string;
  value: any;
  }[]

### method

- 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

### status

- get status(): number

- #### Returns number

- set status(arg): void

- Set the STATUS value of the returned HTTP Request

  #### Parameters

  - ##### arg: number

  #### Returns void

## Methods

### addHeaders

- addHeaders(header, value): void

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

  #### Parameters

  - ##### header: string

  - ##### value: any

  #### Returns void

Generated using TypeDoc