I am working on a FireFox Extension...
I would look to make a http post to a desired url.
I am looking to do something similar to this post.
HTTP POST in javascript in Firefox Extension
I have also read through Mozilla including... https://developer.mozilla.org/en-US/docs/Learn/HTML/Forms/Sending_forms_through_JavaScript "Using FormData bound to a form element"
The URL(Lambda Function) I am sending this to is not receiving the request. I have not been heavily exposed to javascript. Also, I don't know if there is something I am missing since this is being built as a Firefox Extension.
I have implemented this is my code.
document.addEventListener("submit").addEventListener("click", function(){
var params = "test=test"
var req = new XMLHttpRequest();
req.open('POST', 'https://sdlurjb3zi.execute-api.us-west-2.amazonaws.com/contMang');
req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
req.send(params);
});
The Project is format as so
chcFolder
manifest.json
tabchc.
--dasForm.css
--dasForm.html
--dasForm.js