X Tutup
Skip to content

Http.request forces all requests to be GET requests #5309

@escardin

Description

@escardin

I was writing an authentication wrapper for http and I am passing all my methods through http.request since I do not have (or want) access to base options or the mergeOptions function.

http.request passes RequestMethods.Get to all calls to mergeOptions, which then overwrites my passed method of Post.

https://github.com/angular/angular/blob/master/modules/angular2/src/http/http.ts#L106

The default method is Get in the base options, so passing Get is redundant, and the arguments to mergeOptions should be rearranged so that method is optional.

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

      X Tutup