Git Product home page Git Product logo

Comments (6)

marchon avatar marchon commented on July 20, 2024 2

The RFC for HTTP [RFC 7231] includes a specification for "Content Negotiation" between the request agent and the response agent. Encapsulating a method of communication of preferred request and response metadata could solve a lot of not yet anticipated future problems.

5.3. Content Negotiation

The following request header fields are sent by a user agent to
engage in proactive negotiation of the response content, as defined
in Section 3.4.1. The preferences sent in these fields apply to any
content in the response, including representations of the target
resource, representations of error or processing status, and
potentially even the miscellaneous text strings that might appear
within the protocol.

+-------------------+---------------+
| Header Field Name | Defined in... |
+-------------------+---------------+
| Accept | Section 5.3.2 |
| Accept-Charset | Section 5.3.3 |
| Accept-Encoding | Section 5.3.4 |
| Accept-Language | Section 5.3.5 |
+-------------------+---------------+

5.3.2. Accept

The "Accept" header field can be used by user agents to specify response media types that are acceptable.

3.1.1.5. Content-Type

The "Content-Type" header field indicates the media type of the associated representation

So: Accept indicates what kind of response from the server the client can accept. Content-type always is about the content of the current request or response.

So if your request has no payload, you don't use a content-type request header.

from spec.

fmvilas avatar fmvilas commented on July 20, 2024

I'll dig a bit more on this feature because it's really interesting. Thanks!

from spec.

stale avatar stale commented on July 20, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from spec.

github-actions avatar github-actions commented on July 20, 2024

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 30 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

from spec.

github-actions avatar github-actions commented on July 20, 2024

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 30 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

from spec.

smoya avatar smoya commented on July 20, 2024

We can close this as Request/Reply pattern is now a thing in v3.

from spec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.