Skip to content

Commit

Permalink
Just parse urls with core module.
Browse files Browse the repository at this point in the history
We don't wanna do any magic qith url-parse-lax, just wrap the core functionality
  • Loading branch information
lukechilds committed Jun 10, 2017
1 parent e255a74 commit 6be08f6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
"http-cache-semantics": "^3.7.3",
"lowercase-keys": "^1.0.0",
"normalize-url": "^1.9.1",
"responselike": "^0.1.0",
"url-parse-lax": "^1.0.0"
"responselike": "^0.1.0"
},
"devDependencies": {
"ava": "^0.19.1",
Expand Down
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const urlLib = require('url');
const normalizeUrl = require('normalize-url');
const getStream = require('get-stream');
const CachePolicy = require('http-cache-semantics');
const urlParseLax = require('url-parse-lax');
const Response = require('responselike');
const lowercaseKeys = require('lowercase-keys');
const cloneResponse = require('clone-response');
Expand All @@ -17,7 +16,7 @@ const cacheKey = opts => {

const cacheableRequest = (request, opts, cb) => {
if (typeof opts === 'string') {
opts = urlParseLax(opts);
opts = urlLib.parse(opts);
}
opts = Object.assign({
headers: {},
Expand Down

0 comments on commit 6be08f6

Please sign in to comment.