jwagener/httmultiparty — Issue #11: default_params with query hash
Author: maletor
Created: 2011-11-12 01:23:13+00:00
State: open

```
class API
include HTTMultiParty

default_params :XSC => 'system'
format :xml
headers 'User-Agent' => "gem"
debug_output

def self.post_stuff
post("https://google.com/", :query => { :file => File.new("#{Rails.root}/tmp/BosJC.png") })
end
end

API.post_stuff
```
Returns bad stuff

```
# => opening connection to google.com...
opened
opening connection to google.com...
opened
<- "POST /?XSC&system ...................
```

```
class API
include HTTMultiParty

default_params :XSC => 'system'
format :xml
headers 'User-Agent' => "gem"
debug_output

def self.post_stuff
post("https://google.com/", :query => { :file => File.new("#{Rails.root}/tmp/BosJC.png") })
end
end

API.post_stuff
```
Returns good stuff

```
# => opening connection to google.com...
opened
opening connection to google.com...
opened
<- "POST /?XSC=system ...................
```