AngularJS: API: ng/provider/$httpProvider


  1. - $http
  2. - provider in module ng

Use $httpProvider to change the default behavior of the $http service.


  • defaults

    Object containing default values for all $http requests.

    • defaults.xsrfCookieName - {string} - Name of cookie containing the XSRF token. Defaults value is 'XSRF-TOKEN'.

    • defaults.xsrfHeaderName - {string} - Name of HTTP header to populate with the XSRF token. Defaults value is 'X-XSRF-TOKEN'.

    • defaults.headers - {Object} - Default headers for all $http requests. Refer to $http for documentation on setting default headers.

      • defaults.headers.common
      • defaults.headers.put
      • defaults.headers.patch