diff options
author | Phil Dibowitz <phild@fb.com> | 2015-02-05 11:05:34 -0800 |
---|---|---|
committer | Phil Dibowitz <phild@fb.com> | 2015-03-26 12:35:27 -0700 |
commit | 1b2a6e5f107254cce8200a4750035b30265ae0c8 (patch) | |
tree | 31329630f047fde21573f3b761c8335a705b8849 /lib/chef_zero/rest_base.rb | |
parent | 986f72c3b9636372873b0ad1031827b454f5e796 (diff) | |
download | chef-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.rb | 4 |
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 |