Search code examples
node.jsexpresswebserver

Sending a request to a third party server


I am trying to mimic what happens when I click a check box on the browser. Basically, I want to have my program send the same request to the third party server that would happen if I was actually on the website doing it myself. I just need some reference to what I can use to do this?

I'm using node.js and express.

When I click a certain entry I get back http://website.com/createOrUpdateEntry?matchup=m57342o543

I have all the specific ids already I just need to find a way to send back that same http request from my server instead of going to the website and doing it manually.

It's on a different website. It just updates the page as a submission.

Request URL:http://website.com/createOrUpdateEntry?matchup=m5‌​7342o543 Request Method:GET Status Code:302 Found Remote Address:68.71.212.199:80 Referrer Policy:no-referrer-when-downgrade

so far I've looked at cURL and the json.post method. I was just trying to figure out how to actually start the process and what I need to use


Solution

  • Your question is not very clear. From what I understand, you want to send an http request to another server that is not yours. To do you can use this module found here: https://www.npmjs.com/package/request