summaryrefslogtreecommitdiffstats
path: root/devtools/client/netmonitor/test/html_curl-utils.html
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/netmonitor/test/html_curl-utils.html')
-rw-r--r--devtools/client/netmonitor/test/html_curl-utils.html17
1 files changed, 15 insertions, 2 deletions
diff --git a/devtools/client/netmonitor/test/html_curl-utils.html b/devtools/client/netmonitor/test/html_curl-utils.html
index 8ff7ecdf0..eb5c0c5b6 100644
--- a/devtools/client/netmonitor/test/html_curl-utils.html
+++ b/devtools/client/netmonitor/test/html_curl-utils.html
@@ -52,6 +52,17 @@
xhr.send(params);
}
+ function ajaxPatch(aUrl, aCallback) {
+ let xhr = new XMLHttpRequest();
+ xhr.open("PATCH", aUrl, true);
+ xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
+ xhr.onload = function() {
+ aCallback();
+ };
+ var params = "param1=value1&param2=value2&param3=value3";
+ xhr.send(params);
+ }
+
function ajaxMultipart(aUrl, aCallback) {
var xhr = new XMLHttpRequest();
xhr.open("POST", aUrl, true);
@@ -88,8 +99,10 @@
function performRequests(aUrl) {
ajaxGet(aUrl, () => {
ajaxPost(aUrl, () => {
- ajaxMultipart(aUrl, () => {
- submitForm();
+ ajaxPatch(aUrl, () => {
+ ajaxMultipart(aUrl, () => {
+ submitForm();
+ });
});
});
});