Skip to content

feat(common): Allow passing metadata to HttpClient options - #20579

Closed
wKoza wants to merge 1 commit into
angular:masterfrom
wKoza:allow-passing-metadata
Closed

wKoza wants to merge 1 commit into
angular:masterfrom
wKoza:allow-passing-metadata

Conversation

@wKoza

@wKoza wKoza commented Nov 22, 2017

Copy link
Copy Markdown
Contributor

closes #18155

PR Type

What kind of change does this PR introduce?

Allow passing metadata to HttpClient options

[ ] Bugfix
[X] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] angular.io application / infrastructure changes
[ ] Other... Please describe:

@wKoza
wKoza force-pushed the allow-passing-metadata branch 4 times, most recently from 3c35826 to da68c85 Compare November 25, 2017 10:54
@mhevery mhevery added the area: common/http Issues related to HTTP and HTTP Client label Nov 27, 2017
@chenkie

chenkie commented Dec 5, 2017

Copy link
Copy Markdown

Really looking forward to this 👍

@mkp05

mkp05 commented Jan 11, 2018

Copy link
Copy Markdown

Great! It would be awesome to have this PR accepted and merged!

@ngbot

ngbot Bot commented Jan 16, 2018

Copy link
Copy Markdown

Hello? Don't want to hassle you. Sure you're busy. But this PR has some merge conflicts that you probably ought to resolve.
That is... if you want it to be merged someday...

1 similar comment
@ngbot

ngbot Bot commented Jan 16, 2018

Copy link
Copy Markdown

Hello? Don't want to hassle you. Sure you're busy. But this PR has some merge conflicts that you probably ought to resolve.
That is... if you want it to be merged someday...

@wKoza
wKoza force-pushed the allow-passing-metadata branch from da68c85 to 2d030ff Compare January 25, 2018 17:36
@ngbot

ngbot Bot commented Jan 30, 2018

Copy link
Copy Markdown

Hi @wKoza! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

1 similar comment
@ngbot

ngbot Bot commented Jan 30, 2018

Copy link
Copy Markdown

Hi @wKoza! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

@rtrompier

Copy link
Copy Markdown

We really need this PR guys ;)

@jasonaden jasonaden added this to the needsTriage milestone Jan 29, 2019
@imaksp

imaksp commented Sep 19, 2020

Copy link
Copy Markdown
Contributor

why this is moved to backlog, is this being re-implemented by angular team?

@pullapprove
pullapprove Bot requested a review from alxhub September 22, 2020 15:06
@mhevery mhevery self-assigned this Dec 1, 2020
@mhevery
mhevery force-pushed the allow-passing-metadata branch from a4c8a25 to c031fd9 Compare December 1, 2020 21:04
@mhevery
mhevery force-pushed the allow-passing-metadata branch from c031fd9 to ad59304 Compare December 1, 2020 21:08
@alxhub

alxhub commented Dec 1, 2020

Copy link
Copy Markdown
Member

There are a couple of issues that prevent us from merging this PR.

Technically, the PR is incomplete - it only adds metadata to the constructor of HttpRequest, but does not actually capture or propagate the values. There are no tests which validate the new feature (probably because it's not yet implemented).

On a broader note, metadata is something that we'd really like to do, but don't have the bandwidth currently to implement correctly. This is more challenging than you'd expect - HttpClient requests are designed around an immutable, Observable based API. This allows them to be cleanly modified and retried in interceptors in an idempotent way. Metadata should fit cleanly into this pattern. I suspect that a correct, code-size-neutral implementation will refactor the implemetations of HttpParams and HttpHeaders into a separate, shared immutable core that can be used for metadata as well.

@alxhub alxhub closed this Dec 1, 2020
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Jan 1, 2021
@pullapprove pullapprove Bot added the area: common Issues related to APIs in the @angular/common package label Jan 1, 2021
@ngbot ngbot Bot modified the milestones: needsTriage, Backlog Jan 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: common/http Issues related to HTTP and HTTP Client area: common Issues related to APIs in the @angular/common package cla: yes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow passing misc data to http client options

9 participants