http_proxy.txt 495 B

1234567891011121314151617181920212223242526272829
  1. process.env.http_proxy
  2. var http = require("http");
  3. var options = {
  4. host: "proxy",
  5. port: 8080,
  6. path: "http://www.google.com",
  7. headers: {
  8. Host: "www.google.com"
  9. }
  10. };
  11. http.get(options, function(res) {
  12. console.log(res);
  13. res.pipe(process.stdout);
  14. });
  15. process.env.https_proxy
  16. var http = require('http');
  17. http.get ({
  18. host: '127.0.0.1',
  19. port: 8888,
  20. path: 'https://www.google.com/accounts/OAuthGetRequestToken'
  21. }, function (response) {
  22. console.log (response);
  23. });