Skip to content

Conversation

743v45
Copy link
Collaborator

@743v45 743v45 commented May 8, 2019

environment: axios v0.18.0

使用示例:

const upyun = require('upyun')
const service = new upyun.Service('your service name', 'your operator name', 'your operator password')
const client = new upyun.Client(service, {
  proxy: {
    host: '127.0.0.1',
    port: 9000,
    auth: {
      username: 'mikeymike',
      password: 'rapunz3l'
    }
});

注意: 目前除 formPutFile 接口外,其余接口均可使用代理(因 formPutFile 使用 form-data 模块, 其未支持代理功能)


额外补充

Fix http adapter to allow HTTPS connections via HTTP (axios/axios#959)

axios 版本 0.18.x 未支持 https 请求走 http 代理,fixed commit 在其版本 0.19.0-beta.1 中发布. 待 axios 正式版发布更新再合入 node-sdk

@743v45 743v45 mentioned this pull request May 8, 2019
@743v45 743v45 merged commit bf03422 into upyun:master May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants