Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. var http = require("http");
  2.  
  3. var options = {
  4. "method": "GET",
  5. "hostname": "hl7.org",
  6. "port": "80",
  7. "path": "/fhir/address-use",
  8. "headers": {
  9. "content-type": "application/json",
  10. "accept": "application/json",
  11. "cache-control": "no-cache",
  12. "postman-token": "4b785d12-3272-c204-bd78-82931a4b267b"
  13. }
  14. };
  15.  
  16. var req = http.request(options, function (res) {
  17. var chunks = [];
  18.  
  19. res.on("data", function (chunk) {
  20. chunks.push(chunk);
  21. });
  22.  
  23. res.on("end", function () {
  24. var body = Buffer.concat(chunks);
  25. console.log(body.toString());
  26. });
  27. });
  28.  
  29. req.end();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement