# Interface HttpService

HttpService

interface HttpService {
defaults: HttpProviderDefaults;
pendingRequests: RequestConfig[];
delete<T>(url: string, config?: RequestShortcutConfig): HttpPromise<T>;
get<T>(url: string, config?: RequestShortcutConfig): HttpPromise<T>;
head<T>(url: string, config?: RequestShortcutConfig): HttpPromise<T>;
jsonp<T>(url: string, config?: RequestShortcutConfig): HttpPromise<T>;
patch<T>(
url: string,
data: any,
config?: RequestShortcutConfig,
): HttpPromise<T>;
post<T>(
url: string,
data: any,
config?: RequestShortcutConfig,
): HttpPromise<T>;
put<T>(
url: string,
data: any,
config?: RequestShortcutConfig,
): HttpPromise<T>;
<T>(config: RequestConfig): HttpPromise<T>;
}

- HttpService<T>(config: RequestConfig): HttpPromise<T>

  Object describing the request to be made and how it should be processed.

  #### Type Parameters

  - T

  #### Parameters

  - config: RequestConfig

  #### Returns HttpPromise<T>

##### Index

### Properties

defaults
pendingRequests

### Methods

delete
get
head
jsonp
patch
post
put

## Properties

### defaults

defaults: HttpProviderDefaults

Runtime equivalent of the $httpProvider.defaults property. Allows configuration of default headers, withCredentials as well as request and response transformations.

### pendingRequests

pendingRequests: RequestConfig[]

Array of config objects for currently pending requests. This is primarily meant to be used for debugging purposes.

## Methods

### delete

- delete<T>(url: string, config?: RequestShortcutConfig): HttpPromise<T>

  Shortcut method to perform DELETE request.

  #### Type Parameters

  - T

  #### Parameters

  - url: string

    Relative or absolute URL specifying the destination of the request

  - `Optional` config: RequestShortcutConfig

    Optional configuration object

  #### Returns HttpPromise<T>

### get

- get<T>(url: string, config?: RequestShortcutConfig): HttpPromise<T>

  Shortcut method to perform GET request.

  #### Type Parameters

  - T

  #### Parameters

  - url: string

    Relative or absolute URL specifying the destination of the request

  - `Optional` config: RequestShortcutConfig

    Optional configuration object

  #### Returns HttpPromise<T>

### head

- head<T>(url: string, config?: RequestShortcutConfig): HttpPromise<T>

  Shortcut method to perform HEAD request.

  #### Type Parameters

  - T

  #### Parameters

  - url: string

    Relative or absolute URL specifying the destination of the request

  - `Optional` config: RequestShortcutConfig

    Optional configuration object

  #### Returns HttpPromise<T>

### jsonp

- jsonp<T>(url: string, config?: RequestShortcutConfig): HttpPromise<T>

  Shortcut method to perform JSONP request.

  #### Type Parameters

  - T

  #### Parameters

  - url: string

    Relative or absolute URL specifying the destination of the request

  - `Optional` config: RequestShortcutConfig

    Optional configuration object

  #### Returns HttpPromise<T>

### patch

- patch<T>(url: string, data: any, config?: RequestShortcutConfig): HttpPromise<T>

  Shortcut method to perform PATCH request.

  #### Type Parameters

  - T

  #### Parameters

  - url: string

    Relative or absolute URL specifying the destination of the request

  - data: any

    Request content

  - `Optional` config: RequestShortcutConfig

    Optional configuration object

  #### Returns HttpPromise<T>

### post

- post<T>(url: string, data: any, config?: RequestShortcutConfig): HttpPromise<T>

  Shortcut method to perform POST request.

  #### Type Parameters

  - T

  #### Parameters

  - url: string

    Relative or absolute URL specifying the destination of the request

  - data: any

    Request content

  - `Optional` config: RequestShortcutConfig

    Optional configuration object

  #### Returns HttpPromise<T>

### put

- put<T>(url: string, data: any, config?: RequestShortcutConfig): HttpPromise<T>

  Shortcut method to perform PUT request.

  #### Type Parameters

  - T

  #### Parameters

  - url: string

    Relative or absolute URL specifying the destination of the request

  - data: any

    Request content

  - `Optional` config: RequestShortcutConfig

    Optional configuration object

  #### Returns HttpPromise<T>