Electron remote for sending request to a server


#1

In my application, after an user is signing up, I want to send a request to a server with the user’s data.
What is the best procedure to do this? Should I use the ipc to transmit the data over to the main process, and then initialize the request, or is it possible to require(request) directly into the renderer and send the data from here.
Also, do I need the remote module to require the request module from main, or I can do it directly from the renderer?
Thank you!


#2

The main process is mostly for handling desktop-application-level actions. You can think of renderer processes as individual tabs in Chrome. Each one can run an entire web app without ever having to call out to the main process.


#3

So there is not a protocol to follow whether I choose to send data directly or not from the renderer, if I’m understanding correctly.


#4

The protocol is to treat each renderer process like a browser tab and have all functions of the web app be handled by the renderer process.