I’m looking to make an HTTP POST request to a PHP script on a server from a Firefox extension and get JSON in return. The amount of data that I would ideally like to send to the server in one request is too large for a GET request (due to the practical URL length restrictions). Therefore, I cannot use JSONP with a GET request.
Is it possible to access any native Firefox browser component to make a POST request to the server or must an XMLHttpRequest be used? (This extension is being developed for Firefox 4.)
From your comment:
Luckily, those origin restrictions don’t apply when using XMLHttpRequest from privileged code (like in a Firefox extension) so you can just use it. If it doesn’t work, leave more comments or open a new question.
https://developer.mozilla.org/En/Using_XMLHttpRequest