Commit 50ec3daa authored by xzj's avatar xzj

修复undefined

parent db7f9284
...@@ -63,7 +63,7 @@ module.exports = function (options) { ...@@ -63,7 +63,7 @@ module.exports = function (options) {
ctx.req.connection.setNoDelay(true) ctx.req.connection.setNoDelay(true)
ctx.curl = function (option, extra) { ctx.curl = function (option, extra) {
if (typeof option === 'string') { if (typeof option === 'string') {
option = {uri: option} option = {url: option}
} }
if (!option.method) { if (!option.method) {
...@@ -106,7 +106,7 @@ module.exports = function (options) { ...@@ -106,7 +106,7 @@ module.exports = function (options) {
ctx.pipe = function (option) { ctx.pipe = function (option) {
if (typeof option === 'string') { if (typeof option === 'string') {
option = {uri: option} option = {url: option}
} }
option = Object.assign({}, pipeDefault, option) option = Object.assign({}, pipeDefault, option)
......
{ {
"name": "request-proxy", "name": "request-proxy",
"version": "1.1.0", "version": "1.1.1",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment