Lechucico
Lechucico

Reputation: 2102

Chef: Http_request take response

I would like to take the http response from the following http request:

http_request 'init' do
  url 'http://127.0.0.1:8200/v1/sys/init'
  message ({})
  action :put
end

Thanks.

Upvotes: 0

Views: 425

Answers (1)

coderanger
coderanger

Reputation: 54221

You don't do that, resources don't have output values in general. You would use the underlying HTTP library (Chef::HTTP) or just use something like Faraday in your own code.

Upvotes: 1

Related Questions