AngularTS
    Preparing search index...

    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>;
    }
    Index

    Properties

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

    pendingRequests: RequestConfig[]

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

    Methods

    • 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

      • Optionalconfig: 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

      • Optionalconfig: RequestShortcutConfig

        Optional configuration object

      Returns 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

      • Optionalconfig: RequestShortcutConfig

        Optional configuration object

      Returns HttpPromise<T>