Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

$http doesn't cache without specifying method- 'GET' #5985

Closed
@dzdrazil

Description

@dzdrazil

I'm not sure if this should be a documentation or code fix, but the problem is fairly simple- it's line 933 of https://github.com/angular/angular.js/blob/master/src/ng/http.js:

By default, $http({...options...}) will issue GET requests. However, the requests are not cached (even when specifying a cache option) UNLESS the method: 'GET' key/value are included in the options passed to $http- it's not mixed into the configuration as a default value.

Should $http throw an exception without a specified method, or should ALL $http behavior work by assuming the method is GET unless otherwise specified?

I'm open to taking a stab at a pull request, but it'll be a few days and I wanted to get this in while I had time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions