http-accept-header Questions

2

Solved

I would like to configure my ASP.NET Core Web API using .NET 6 to only accept application/json as the accept header value. How can I configure that?
Untouchable asked 12/8, 2022 at 18:51

1

I have some frontend javascript that makes an asynchronous http request to my backend rails server. On the frontend I am not using XHR (I use axios, although that's not entirely relevant to the que...
Hutcherson asked 20/9, 2019 at 3:43

3

Solved

What is the difference between these two calls? My end goal is to have Accept: application/json sent over the wire, not to append to some default set of other MIME types. HttpClient client = new H...

1

Solved

I'm using spring to build my web app. In my custom WebMvcConfigurationSupport class, I setup basic ContentNegotiationConfigurer like following: @Override public void configureContentNegotiation(f...
Koh asked 31/5, 2017 at 4:53

1

Solved

I'm trying to get my api set up so it will respond with with XML or JSON depending upon the Accept header. I'm following the tutorial by Shawn W: https://wildermuth.com/2016/03/16/Content_Negotiat...

0

While it's possible to get the browser's User-Agent in Javascript via navigator.userAgent, is it likewise possible to get the browser's Accept header without performing a HTTP request?
Laboured asked 12/8, 2016 at 17:5

2

RFC 7231 - HTTP/1.1 Semantics and Content, 5.3 Content Negotiation does not define how to specify to accept a multipart/related content type with particular content types for body parts in the acce...
Perfectible asked 31/3, 2016 at 11:58

1

I am working on an ASP.Net Web API 2 RESTful web service for importing and exporting data from my database. For my export method, the client has several options for exporting data in different form...
Heteroplasty asked 18/11, 2014 at 18:10

2

Solved

In spray I would like to respond with different content-types, depending on the given Accept header. I've seen a couple of suggestions in the question by rompetroll, but I would like to hear if the...
Estes asked 14/1, 2014 at 16:22
1

© 2022 - 2024 — McMap. All rights reserved.