summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorZack Hobson2013-12-27 07:32:42 -0800
committerZack Hobson2013-12-27 07:32:42 -0800
commitbe3dd30c484d4b737a7890113acc8b2153c6add4 (patch)
tree9bc78e05c163e8ae970a83f980382565a79c9407 /lib
parent533d4cbe49321ef1090b0470eaf9914f810e74ea (diff)
downloadhcl-be3dd30c484d4b737a7890113acc8b2153c6add4.tar.bz2
fix middleware order
Diffstat (limited to 'lib')
-rw-r--r--lib/hcl/harvest_middleware.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/hcl/harvest_middleware.rb b/lib/hcl/harvest_middleware.rb
index edf3b01..adb9427 100644
--- a/lib/hcl/harvest_middleware.rb
+++ b/lib/hcl/harvest_middleware.rb
@@ -15,14 +15,14 @@ class HCl::HarvestMiddleware < Faraday::Middleware
end
def call(env)
- # basic authentication
- @auth.call(env)
-
# encode with and accept json
env[:request_headers]['Accept'] = MIME_TYPE
env[:request_headers]['Content-Type'] = MIME_TYPE
env[:body] = Yajl::Encoder.encode(env[:body])
+ # basic authentication
+ @auth.call(env)
+
# response processing
@app.call(env).on_complete do |env|
case env[:status]