File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
devtools-network-reference Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ <h1>DevTools Network tool reference Demo</h1>
16
16
< button id ="iframes "> Load iframes</ button >
17
17
< button id ="stream-sse "> Stream server-sent events</ button >
18
18
< button id ="form-data "> Send form data</ button >
19
+ < button id ="encoded-query-params "> Send encoded query parameters</ button >
19
20
20
21
< div id ="iframes-placeholder "> </ div >
21
22
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ const iframesButton = document.getElementById("iframes");
3
3
const iframesPlaceholderEl = document . getElementById ( "iframes-placeholder" ) ;
4
4
const streamSseButton = document . getElementById ( "stream-sse" ) ;
5
5
const formDataButton = document . getElementById ( "form-data" ) ;
6
+ const encodedQueryParamsButton = document . getElementById ( "encoded-query-params" ) ;
6
7
7
8
xhrButton . addEventListener ( "click" , ( ) => {
8
9
const xhr = new XMLHttpRequest ( ) ;
@@ -51,3 +52,14 @@ formDataButton.addEventListener("click", async () => {
51
52
body : formData
52
53
} ) ;
53
54
} ) ;
55
+
56
+
57
+ encodedQueryParamsButton . addEventListener ( "click" , async ( ) => {
58
+ const params = new URLSearchParams ( ) ;
59
+ params . append ( "name" , "Danas Barkus" ) ;
60
+ params . append ( "url" , "https://contoso.com/àéèôçл" ) ;
61
+
62
+ await fetch ( `./encoded-query-params-endpoint?${ params . toString ( ) } ` , {
63
+ method : "GET"
64
+ } ) ;
65
+ } ) ;
You can’t perform that action at this time.
0 commit comments