[devdocsgjs/main: 1818/1867] compat_tables: use Request.run
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 1818/1867] compat_tables: use Request.run
- Date: Fri, 19 Nov 2021 23:48:21 +0000 (UTC)
commit 09edf13d950b9d7ebc648d0e82b1bdd5ba6d6ef4
Author: Simon Legner <Simon Legner gmail com>
Date: Fri Oct 22 18:10:04 2021 +0200
compat_tables: use Request.run
lib/docs/filters/mdn/compat_tables.rb | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/lib/docs/filters/mdn/compat_tables.rb b/lib/docs/filters/mdn/compat_tables.rb
index bb243f54..13695b9e 100644
--- a/lib/docs/filters/mdn/compat_tables.rb
+++ b/lib/docs/filters/mdn/compat_tables.rb
@@ -46,7 +46,9 @@ module Docs
end
def request_bcd_uris
- index_json = JSON.load(Net::HTTP.get(URI(current_url.to_s + '/index.json')))
+ url = current_url.to_s + '/index.json'
+ response = Request.run url
+ index_json = JSON.load response.body
uris = []
@@ -63,9 +65,9 @@ module Docs
return uris
end
- def generate_compatibility_table_wrapper(uri)
-
- @json_data = JSON.load(Net::HTTP.get(URI(uri)))['data']
+ def generate_compatibility_table_wrapper(url)
+ response = Request.run url
+ @json_data = JSON.load(response.body)['data']
html_table = generate_basic_html_table()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]