title: Trying to send JSON response with Restify
body: <p>I am trying to list all jobs with a certain tag on angel.co using their API with the current call </p>
  
  <p><a href="https://api.angel.co/1/tags/10/startups" rel="nofollow">https://api.angel.co/1/tags/10/startups</a></p>
  
  <p>and then trying to parse it and show in the browser using restify </p>
  
  
  
  <pre><code>var tagUrl = "https://api.angel.co/1/tags/10/startups"
      request({
          url: tagUrl,
          json: true
      }, function (error, response, body) {
  
          if (!error &amp;&amp; response.statusCode === 200) {
             console.log(body) // Print the json response
          }
          else console.log("error" + error)
      })
  </code></pre>
  
  <p>I'm getting the console.log(body)-part to work, but when I am trying to send the response to the browser it doesn't show anything when I am trying to send it with </p>
  
  <pre><code>res.send('hello ' + req.params.name + body);
  </code></pre>
  
  <p>Should I parse or stringify it in some way ?</p>
  
  <p>edit: This is the final code</p>
  
  <pre><code>function respond(req, res, next) {
  var tag = req.params.tag;
  var url = "http://api.angel.co/1/tags/"+tag+"/startups/?
  
  
  request({
       url: url,
      json: true
  }, function (error, response, body) {
  
  if (!error &amp;&amp; response.statusCode === 200) {
      console.log(body) // Print the json response
      res.send( req.params.name + JSON.stringify(body));
  
  }
  else console.log("error" + error)
  })
  </code></pre>