Re: [whatwg/fetch] Editorial: clarify how to get MIME type for request and response (PR #1657)

@CYBAI commented on this pull request.



> @@ -7178,6 +7174,22 @@ returns failure or a <a for=/>MIME type</a>.
 
 <hr>
 
+<div algorithm>
+<p>To <dfn id=concept-body-get-mime-type for=Body>get the MIME type</dfn>, given a {{Request}}
+or {{Response}} object, <var>requestOrResponse</var>, run these steps:
+
+<ol>
+ <li><p>Let <var>headers</var> be null
+ <li><p>If <var>requestOrResponse</var> is a {{Request}} object, then set <var>headers</var> to
+ <var>requestOrResponse</var>'s <a for=Request>request</a>'s {{Request/headers}}.
+ <li><p>Otherwise, set <var>headers</var> to <var>requestOrResponse</var>'s <a for=Response>
+ response</a>'s {{Response/headers}}.
+ <li><p>Let <var>mimeTypeInHeaders</var> be the result of <a for="header list">extracting a
+ MIME type</a> from <var>headers</var>.

ah, I see. Thank you! I will move the whole element to next line 🙏 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1657#discussion_r1206444845
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1657/review/1445648375@github.com>

Received on Friday, 26 May 2023 08:48:30 UTC