Fix the wrap method for file uploads

Hey guys!

I was trying to use Swagger for a file upload endpoint, and it was broken, looks like the _wrap method doesn't work properly for file uploads, so I did a re implementation of that method and now it works nicely.

``` javascript
Uncaught TypeError: Cannot read property 'Content-Type' of undefined 
```