# transfer

transfer library 

## HttpClient

Support for large file transfer on the browser side

html
```html
<input type="file" onchange="upload" />
```

javascript

```javascript

const upload = async (e) =>  {
  const files = e.target.files || []
    
  for (let i = 0, len = files.length; i < len; i++) {
    const client = new HttpClient({
      file: files[i],
      postURL: '', // server api url
      postParams: {}, 
      onStart: (taskInfo) => {
        // todo
        console.log(taskInfo)
      },
      onProgress: (info) => {
        // todo
        console.log(info)
      },
      onComplete: () => {
    
      }
    })
    
    await client.start() // start transfer

    // await client.stop()
  }
}

```
