Download ADOOR_ACE/node_modules/express-http-proxy/test/urlParsing.js from thisisAce/adoor-store: direct link, hf CLI and curl.
- Browser
- Download file 827 Bytes
-
https://huggingface.co/thisisAce/adoor-store/resolve/main/ADOOR_ACE/node_modules/express-http-proxy/test/urlParsing.js
- Command line
-
hf download hf://thisisAce/adoor-store/ADOOR_ACE/node_modules/express-http-proxy/test/urlParsing.js
-
curl -L -o urlParsing.js https://huggingface.co/thisisAce/adoor-store/resolve/main/ADOOR_ACE/node_modules/express-http-proxy/test/urlParsing.js
827 Bytes
| ; | |
| var assert = require('assert'); | |
| var express = require('express'); | |
| var request = require('supertest'); | |
| var proxy = require('../'); | |
| describe('url parsing', function () { | |
| this.timeout(10000); | |
| it('can parse a url with a port', function (done) { | |
| var app = express(); | |
| app.use(proxy('http://httpbin.org:80')); | |
| request(app) | |
| .get('/') | |
| .end(function (err) { | |
| if (err) { return done(err); } | |
| assert(true); | |
| done(); | |
| }); | |
| }); | |
| it('does not throw `Uncaught RangeError` if you have both a port and a trailing slash', function (done) { | |
| var app = express(); | |
| app.use(proxy('http://httpbin.org:80/')); | |
| request(app) | |
| .get('/') | |
| .end(function (err) { | |
| if (err) { return done(err); } | |
| assert(true); | |
| done(); | |
| }); | |
| }); | |
| }); | |