Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MockHttpProvider

Hierarchy

Index

Properties

RequestLog

RequestLog: object[] = []

UseTimeout

UseTimeout: boolean = true

Protected _headers

_headers: Map<string, string> = new Map()

Accessors

ActualHeaders

  • get ActualHeaders(): Map<string, string>

LastOptions

  • get LastOptions(): AjaxRequest

Methods

AddError

  • AddError(error: any): this

AddResponse

  • AddResponse(response: any): this

Ajax

  • Ajax<T>(tReturnType: object, options: AjaxRequest, additionalHeaders?: object[]): Observable<T>
  • Public entry point for executing Ajax calls using a specific provider

    Type parameters

    • T

    Parameters

    • tReturnType: object

      The return type

    • options: AjaxRequest

      Additional RxJs AjaxRequest options (the global headers will be overridden)

    • Default value additionalHeaders: object[] = []

    Returns Observable<T>

SetGlobalHeader

  • SetGlobalHeader(headerName: string, headerValue: string): void

UnsetGlobalHeader

  • UnsetGlobalHeader(headerName: string): void

Upload

  • Upload<T>(tReturnType: object, File: File, options: AjaxRequest & object): Observable<T>

Protected ajaxInner

  • ajaxInner<T>(tReturnType: object, options: AjaxRequest): Observable<T>

Protected uploadInner

  • uploadInner<T>(returnType: object, File: File, options?: undefined | AjaxRequest & object): Observable<T>

Generated using TypeDoc