Skip to content

Add onInformation interim response support - #1942

Open
jasnell wants to merge 1 commit into
whatwg:mainfrom
jasnell:jasnell/on-information
Open

Add onInformation interim response support#1942
jasnell wants to merge 1 commit into
whatwg:mainfrom
jasnell:jasnell/on-information

Conversation

@jasnell

@jasnell jasnell commented Jul 11, 2026

Copy link
Copy Markdown

Adds an optional fetch call for receiving 1xx responses in a fetch.

e.g.

fetch('...', {
  onInformation(status, headers) {
    // status is the 1xx code
    // headers is the Headers object
  },
});

Support is entirely optional. Implementations that currently would ignore onInformation are fully compliant.


  • At least two implementers are interested (and none opposed):
  • Tests are written and can be reviewed and commented upon at:
  • Implementation bugs are filed:
    • Chromium: …
    • Gecko: …
    • WebKit: …
    • Deno (not for CORS changes): …
  • MDN issue is filed: …
  • The top of this comment includes a clear commit message to use.

(See WHATWG Working Mode: Changes for more details.)


💥 Error: 422 Unprocessable Entity 💥

PR Preview failed to build. (Last tried on Jul 11, 2026, 7:14 PM UTC).

More

PR Preview relies on a number of web services to run. There seems to be an issue with the following one:

🚨 Spec Generator - Spec Generator is the web service used to build bikeshed/ReSpec specs

🔗 Related URL

Error output:

[
    {
        "lineNum": "9769:11",
        "messageType": "link",
        "text": "No 'dfn' refs found for 'invoke a callback function'."
    },
    {
        "lineNum": "6768:10",
        "messageType": "lint",
        "text": "RFC2119 keyword in non-normative section (use: might, can, has to, or override with <span class=allow-2119>): \n         callback is invoked for all informational responses, including 100 (Continue),\n         101 (Switching Protocols), 102 (Processing), and 103 (Early Hints).\n         Support for invoking this callback is entirely optional; implementations that\n         never invoke it are fully compliant with this specification.\n\n       "
    },
    {
        "lineNum": "8764:4",
        "messageType": "lint",
        "text": "RFC2119 keyword in non-normative section (use: might, can, has to, or override with <span class=allow-2119>):  object containing the informational\n   response’s headers, appropriately filtered. Any return value is ignored. Implementations are\n   not required to support informational responses and may ignore this option entirely.\n  "
    },
    {
        "lineNum": null,
        "messageType": "failure",
        "text": "Did not generate, due to errors exceeding the allowed error level."
    }
]

This seems to be an issue with the Spec Generator service. PR Preview doesn't manage this service and so has no control over it. If you've identified an issue with it, you can report the issue to the maintainers of Spec Generator directly. Please be courteous. Thank you!

If you don't have enough information above to solve the error by yourself or if the issue doesn't seem related to Spec Generator, you can file an issue with PR Preview.

Adds an optional fetch call for receiving 1xx responses
in a fetch.

e.g.

```js
fetch('...', {
  onInformation(status, headers) {
    // status is the 1xx code
    // headers is the Headers object
  },
});
```

Support is entirely optional. Implementations that currently
would ignore `onInformation` are fully compliant.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant