The problem is that I have very little knowledge of programming, and when I tried to copy and paste the code below to the javascript node function on appgyver, it did not work.
Yes, Thank you for the tip, but I also would like to know what is going wrong in the JS code.
This is the first time that I am trying to do something with the JS node and it is frustating not knowing what is the problem, because next time that I face the same problem, I will again get stuck on it.
Javascript errors are emited to the console which you can use to debug, also using console.log can help you to pinpoint your error. It’s just plain javascript ran in the browser, nothing magic.
I tried to use sendgrid and mailjet, but they work in cURL, PHP, NODE, RUBY, PYTHON, GO, C#, and JAVA.
I still can’t figure it out how to setup all the post request in appgyver as the information on, for example, MailJet API documentation is different from the one available on appgyver.
I got confused because both SendGrid and MailJet API documentation says that I have to have cURL installed on my machine or use an official library.
How is this supposed to work? I am totally lost here…
Can you help me understanding and informing what should I put on relative path, response key path and if I need to use a HTTP Header, URL placeholder and Query parameter?
cURL is just a piece of software that you use to make HTTP requests.
BTW your browser is also a software that does HTTP requests… cURL just helps to add more parameter to the HTTP request.
To send your email via SendGrid or MailJet you need to make a HTTP .
Appgyver is making also HTTP requests in at least 3 ways:
via Rest API data module - but this should be used when you expect to recieve data as response to your HTTP request and further use this data in your app
via HTTP request module in components - this is probably what you should use
via JS block when you can code the request yourself (using fetch () command )
To know you what parameters to use for the request you use cURL syntax as quide:
looks like there is also authentication needed using your private and public key @Sasu_Makinen Can appgyver http request component add user for authentication?