question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add header `Request-Context` to class Microsoft.Net.Http.Headers.HeaderNames

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

It’s used by Application Insights.

Describe the solution you’d like

Add header Request-Context to class Microsoft.Net.Http.Headers.HeaderNames

Additional context

It’s missing currently

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
halter73commented, Apr 11, 2022

The header you requested is a non-standard header only used by app insights. As the Microsoft.Net.Http.Headers.HeaderNames class is for “well-know headers”, i.e. the ones defined in RFCs it doesn’t really meet the bar for inclusion.

Triage: Agreed with the above. We like the idea of an extension method for HeaderNames, but it wouldn’t work today on a static class. We could consider an extension point like Microsoft.AspNetCore.HttpResults.Extensions, but I doubt we’d do it.

1reaction
blowdartcommented, Apr 7, 2022

Ah sorry @MihaZupan

@kevinharing you could ask AppInsights if they wanted to add an extension method to Microsoft.Net.Http.Headers.HeaderNames, that way if you were importing AppInsights you’d get it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add header `Request-Context` to class Microsoft.Net.Http. ...
It's used by Application Insights. Describe the solution you'd like. Add header Request-Context to class Microsoft.Net.Http.Headers.HeaderNames ...
Read more >
HeaderNames Class (Microsoft.Net.Http.Headers)
Defines constants for well-known HTTP headers. ... public static class HeaderNames ... Gets the Access-Control-Allow-Headers HTTP header name.
Read more >
How to set custom headers when using IHttpActionResult?
I need to set an ETag on an outgoing response, and I cannot find any property which gives me access to the response's...
Read more >
HTTP headers - MDN Web Docs - Mozilla
An HTTP header consists of its case-insensitive name followed by a colon ( : ), then by its value. Whitespace before the value...
Read more >
http package - net/http
SetCookie adds a Set-Cookie header to the provided ResponseWriter's headers. The provided cookie must have a valid Name. Invalid cookies may be silently...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found