rubymotion/BubbleWrap — pull request #289 by colinta (2013-08-23 18:57:17+00:00)
Title: Adds `BW::HTTP.query`, which can be used to create `HTTP::Query` classes that do not automatically start

I need to make changes to `query.request` before the connection is started; this adds that feature by adding a factory method `HTTP#query` to the `BW::HTTP` module. This factory can generate `BW::HTTP::Query` objects that do not start the connection. For this purpose, I added the `:autostart` option, which defaults to `true`.

```ruby
BW::HTTP.query.post(...) # => query has not been started
```

`BW::HTTP.query` creates a `HTTP::QueryFactory` object, which has the same methods as `BW::HTTP` (`get, post, etc`). To start the connection, call `Query#start`, which accepts the response handler if you didn't provide it already.

Also, some related changes (documented in the README):

Added `upload_progress` and `download_progress` methods, so that those can be easily assigned before calling `start`.

Added `Query#start` method, which accepts an `:action` block, and calls `@connection.start`.