DEV Community

Discussion on: How to implement email functionality with Node.js, React.js, Nodemailer, and OAuth2

Collapse
 
shakes103 profile image
Onyema O.

Hi Jared Long, thank you so much for this post. I'm trying to use this process to build a Contact Us form on my NextJs website. I've walked through the tutorial but I'm unable to go beyond running the cURL command;

curl -d -url localhost:3001/send

I keep running into an error:

Invoke-WebRequest : A parameter cannot be found that matches parameter name 'url'.
At line:1 char:9

  • curl -d -url localhost:3000/send
  • ~~~~
    • CategoryInfo : InvalidArgument: (:) [Invoke-WebRequest], ParameterBindingException
    • FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.InvokeWebRequestComman d

What do I need to do to go past this level?

Collapse
 
jlong4223 profile image
Jared Long

Hmm I think you could try adding the http:// to the beginning of the url:
curl -d -url http://localhost:3001/send

Collapse
 
jlong4223 profile image
Jared Long • Edited

If that doesn't work, you also don't have to use cUrl and could try hitting the route with Postman if you have it.
Or if you use VSCode, you could install the ThunderClient Extension for testing API routes directly inside of VSCode. marketplace.visualstudio.com/items...

Thread Thread
 
shakes103 profile image
Onyema O.

Okay. I will try this instead and see how it turns out. Thanks!