summaryrefslogtreecommitdiff
path: root/lib/chef_zero/rest_base.rb
diff options
context:
space:
mode:
authorPhil Dibowitz <phild@fb.com>2015-02-05 11:05:34 -0800
committerPhil Dibowitz <phild@fb.com>2015-03-26 12:35:27 -0700
commit1b2a6e5f107254cce8200a4750035b30265ae0c8 (patch)
tree31329630f047fde21573f3b761c8335a705b8849 /lib/chef_zero/rest_base.rb
parent986f72c3b9636372873b0ad1031827b454f5e796 (diff)
downloadchef-zero-1b2a6e5f107254cce8200a4750035b30265ae0c8.tar.gz
Support /version; fix some global URIs
Diffstat (limited to 'lib/chef_zero/rest_base.rb')
-rw-r--r--lib/chef_zero/rest_base.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/chef_zero/rest_base.rb b/lib/chef_zero/rest_base.rb
index 3fa017a..8156e7c 100644
--- a/lib/chef_zero/rest_base.rb
+++ b/lib/chef_zero/rest_base.rb
@@ -181,6 +181,10 @@ module ChefZero
already_json_response(response_code, FFI_Yajl::Encoder.encode(json, :pretty => true))
end
+ def text_response(response_code, text)
+ [response_code, {"Content-Type" => "text/plain"}, text]
+ end
+
def already_json_response(response_code, json_text)
[response_code, {"Content-Type" => "application/json"}, json_text]
end