1

Is there a way to use the POST method with page-worker ?

I could not find anything about setting the request method in the docs, and searching the web was also without relevant results. The only thing I found is how to use POST in the request function, but that gives me the resulting web page as text string instead of a workable DOM.

Well, if POST will absolutely not work with page-worker, parsing this text will be a plan B. But a very ugly one, so I really would appreciate not needing to do this.

Community
  • 1
  • 1
Markus N.
  • 491
  • 4
  • 7

1 Answers1

0

If I'm understanding you correctly, you want to make a post form a content script that you attached to a page? Usually this is not possible to prevent Cross-Site Scripting attacks. What I've done is to relay what needs to be posted from the content script to the add-on script (see the docs) and having the add-on script do the POST request.

SNyamathi
  • 658
  • 6
  • 10
  • It is already done in the add-on script. The purpose is to add additional info to a page. That additional info can only be fetched with a POST request. After doing that, the add-on script passes the fetched info to the content script. – Markus N. Oct 27 '13 at 11:54