Option to upload file directly in the request body and set http method.

Hi
 
I added a few things that seemed useful to me. 

- Fixes a broken test case. Upload was created without file.
- Add support for uploading files directly in request body without multipart encoding.
- Use a blob instead of the file input, makes it more convenient to run the tests. It also fixes a problem that the change event handlers are executed in each following test again.
- Adds the option to set the http method.

If you prefer i can send the commits as separate pull requests.