1

I need to use gulp to call a Web API 2 controller method which returns a string. I was given several recommendations on how to accomplish this:

  1. node-http
  2. Request Library (I was just given the name, but guessing that's it. SO Example)
  3. I also found request/request-promise which seems to also do what I want.

Is there a "recommended" way to make get/post/etc calls too APIs from gulp? Is one of the above methods better than the others? I can't find much in the way of tutorials or general usage advice.

Community
  • 1
  • 1
VSO
  • 11,546
  • 25
  • 99
  • 187
  • 1
    Just use any of them. Maybe fetch package is the simplest. – dfsq Apr 12 '16 at 17:34
  • The recommended way of making HTTP requests from your build tool is not to make HTTP requests from your build tool. That leads to a build you can't reproduce from version controlled history. For a service that uses HTTP, like Swift or S3, you can use their client library. – ssube Apr 12 '16 at 17:39

0 Answers0