Skip to content

Commit

Permalink
Remove Headers.getAll()
Browse files Browse the repository at this point in the history
Content counterpart to mdn/browser-compat-data#12166
  • Loading branch information
ddbeck committed Aug 25, 2021
1 parent bce0af9 commit a219b7c
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 96 deletions.
1 change: 1 addition & 0 deletions files/en-us/_redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7738,6 +7738,7 @@
/en-US/docs/Web/API/HTML_DOM /en-US/docs/Web/API/HTML_DOM_API
/en-US/docs/Web/API/HTML_Santizer_API /en-US/docs/Web/API/HTML_Sanitizer_API
/en-US/docs/Web/API/HashChangeEvent/HashChangeEvent.oldURL /en-US/docs/Web/API/HashChangeEvent/oldURL
/en-US/docs/Web/API/Headers/getAll /en-US/docs/Web/API/Headers/get
/en-US/docs/Web/API/History.length /en-US/docs/Web/API/History/length
/en-US/docs/Web/API/IDBCursor.advance /en-US/docs/Web/API/IDBCursor/advance
/en-US/docs/Web/API/IDBCursor.continue /en-US/docs/Web/API/IDBCursor/continue
Expand Down
11 changes: 0 additions & 11 deletions files/en-us/_wikihistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -55062,17 +55062,6 @@
"kscarfone"
]
},
"Web/API/Headers/getAll": {
"modified": "2020-10-15T21:33:27.725Z",
"contributors": [
"sideshowbarker",
"fscholz",
"jpmedley",
"ziyunfei",
"chrisdavidmills",
"kscarfone"
]
},
"Web/API/Headers/has": {
"modified": "2020-10-15T21:33:26.894Z",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/mozilla/firefox/releases/52/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ <h4 id="Changes_and_removals_3">Changes and removals</h4>
<h3 id="Service_Workers_and_Fetch">Service Workers and Fetch</h3>

<ul>
<li>The {{domxref("Headers.getAll()")}} method has been removed, and {{domxref("Headers.get()")}} now retrieves all values of the specified header, not just the first one (see {{bug(1278275)}}). This is in accordance with the latest Fetch API spec updates.</li>
<li>The <code>Headers.getAll()</code> method has been removed, and {{domxref("Headers.get()")}} now retrieves all values of the specified header, not just the first one (see {{bug(1278275)}}). This is in accordance with the latest Fetch API spec updates.</li>
</ul>

<h3 id="Web_Audio_API">Web Audio API</h3>
Expand Down
7 changes: 0 additions & 7 deletions files/en-us/web/api/headers/get/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,6 @@ <h2 id="Example">Example</h2>
myHeaders.get('Accept-Encoding').split(',').map(v => v.trimStart()); // Returns [ "deflate", "gzip" ]
</pre>

<div class="note">
<p><strong>Note:</strong> {{domxref("Headers.getAll")}} used to have this functionality,
with {{domxref("Headers.get")}} returning only the first value added to the
<code>Headers</code> object. The latest spec has removed <code>getAll()</code>, and
updated <code>get()</code> to return all values.</p>
</div>

<h2 id="Specifications">Specifications</h2>

{{Specifications}}
Expand Down
70 changes: 0 additions & 70 deletions files/en-us/web/api/headers/getall/index.html

This file was deleted.

7 changes: 0 additions & 7 deletions files/en-us/web/api/headers/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,6 @@ <h2 id="Methods">Methods</h2>
<p><strong>Note:</strong> When Header values are iterated over, they are automatically sorted in lexicographical order, and values from duplicate header names are combined.</p>
</div>

<h3 id="Obsolete_methods">Obsolete methods</h3>

<dl>
<dt>{{domxref("Headers.getAll()")}}</dt>
<dd>Used to return an array of all the values of a header within a <code>Headers</code> object with a given name; this method has now been deleted from the spec, and {{domxref("Headers.get()")}} now returns all values of a given name instead of just the first one.</dd>
</dl>

<h2 id="Examples">Examples</h2>

<p>In the following snippet, we create a new header using the <code>Headers()</code> constructor, add a new header to it using <code>append()</code>, then return that header value using <code>get()</code>:</p>
Expand Down

0 comments on commit a219b7c

Please sign in to comment.