From 0dde379ce5e7805632546b50eb2c156ae5db643c Mon Sep 17 00:00:00 2001 From: bo-oz Date: Thu, 12 Apr 2018 11:55:47 +0300 Subject: [PATCH] small refactor --- lib/vimeo_me2/http/http_request.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/vimeo_me2/http/http_request.rb b/lib/vimeo_me2/http/http_request.rb index 44aa3ba..ba3765b 100644 --- a/lib/vimeo_me2/http/http_request.rb +++ b/lib/vimeo_me2/http/http_request.rb @@ -76,9 +76,11 @@ def set_auth_header token end def http_request - body = json_header? ? @body.to_json : @body + return {headers:@headers, body:formatted_body, query:@query} + end - return {headers:@headers, body:body, query:@query} + def formatted_body + json_header? ? @body.to_json : @body end def json_header?