Home Manual Reference Source Test Repository
import {JSONInterceptor} from '@cedx/ngx-core/src/services/json_interceptor.js'
public class | source

JSONInterceptor

Extends:

@angular/http~Http → JSONInterceptor

Decorates the client requests with the application/json MIME type. The Accept and Content-Type headers are added to requests made with this HTTP client when they are not already provided.

Static Member Summary

Static Public Members
public static get

The class decorators.

public static get

The constructor parameters.

Method Summary

Public Methods
public

delete(url: string, options: object): Observable<Response>

Performs a request with DELETE HTTP method.

public

get(url: string, options: object): Observable<Response>

Performs a request with GET HTTP method.

public

head(url: string, options: object): Observable<Response>

Performs a request with HEAD HTTP method.

public

options(url: string, options: object): Observable<Response>

Performs a request with OPTIONS HTTP method.

public

patch(url: string, body: *, options: object): Observable<Response>

Performs a request with PATCH HTTP method.

public

post(url: string, body: *, options: object): Observable<Response>

Performs a request with POST HTTP method.

public

put(url: string, body: *, options: object): Observable<Response>

Performs a request with PUT HTTP method.

public

request(url: string | Request, options: object): Observable<Response>

Performs any type of HTTP request.

Static Public Members

public static get annotations: Array source

The class decorators.

public static get parameters: Array source

The constructor parameters.

Public Methods

public delete(url: string, options: object): Observable<Response> source

Performs a request with DELETE HTTP method.

Params:

NameTypeAttributeDescription
url string

The client request.

options object
  • optional

The options of the client request.

Return:

Observable<Response>

The server response.

public get(url: string, options: object): Observable<Response> source

Performs a request with GET HTTP method.

Params:

NameTypeAttributeDescription
url string

The client request.

options object
  • optional

The options of the client request.

Return:

Observable<Response>

The server response.

public head(url: string, options: object): Observable<Response> source

Performs a request with HEAD HTTP method.

Params:

NameTypeAttributeDescription
url string

The client request.

options object
  • optional

The options of the client request.

Return:

Observable<Response>

The server response.

public options(url: string, options: object): Observable<Response> source

Performs a request with OPTIONS HTTP method.

Params:

NameTypeAttributeDescription
url string

The client request.

options object
  • optional

The options of the client request.

Return:

Observable<Response>

The server response.

public patch(url: string, body: *, options: object): Observable<Response> source

Performs a request with PATCH HTTP method.

Params:

NameTypeAttributeDescription
url string

The client request.

body *

The body of the client request.

options object
  • optional

The options of the client request.

Return:

Observable<Response>

The server response.

public post(url: string, body: *, options: object): Observable<Response> source

Performs a request with POST HTTP method.

Params:

NameTypeAttributeDescription
url string

The client request.

body *

The body of the client request.

options object
  • optional

The options of the client request.

Return:

Observable<Response>

The server response.

public put(url: string, body: *, options: object): Observable<Response> source

Performs a request with PUT HTTP method.

Params:

NameTypeAttributeDescription
url string

The client request.

body *

The body of the client request.

options object
  • optional

The options of the client request.

Return:

Observable<Response>

The server response.

public request(url: string | Request, options: object): Observable<Response> source

Performs any type of HTTP request.

Params:

NameTypeAttributeDescription
url string | Request

The client request.

options object
  • optional

The options of the client request.

Return:

Observable<Response>

The server response.