Sending submitted form data from workers site as JSON formatted data to third-party

I need advice on the logic to use to POST form submissions in JSON to a 3rd party service or even, say, a directory on a website set up only for the submissions. I’ve already created a basic form (it needs few more additions for user info, but that’s simple and not the issue at hand. Here’s the basic setup (I’ve currently set up formaction=https://example.com/submissions on the submit button which sends submissions to a non-existent URL using POST (thus the 404)):

https://wild-disk-b338.why.workers.dev/

Any advice would be most appreciated. The headers in use can be easily inspected by anyone and will have to be relaxed security-wise for the final product. (It’s for the site https://filterlists.com to simplify that part of the process when new lists are being submitted.)

Thank-you in advance.

For further info pls see this GitHub issue: https://github.com/collinbarrett/FilterLists/issues/372

Hey intr0,

I’m taking a bit of a leap of faith here so forgive me if I am off base. I had to infer what your question is based on the above and a quick skim of the github issue. My inference is: How do I submit a form to a third party multi page application yet maintain context inside of my application without use of an api?

If so, I’d recommend one of two approaches:

I’ll continue to monitor this thread, but may be off base in terms of the ask so will stop there just in case :wink:

No, you’re not off base. Your interpretation is pretty much the gist. Ideally, and I know this is a stretch, is to have each submission create a PR in the FilterLists repo. For now I’d just like to begin submitting test data to an endpoint within our control.