Reputation: 1851
I am trying to use the rest-client library of rails. Can anyone help me understand this code.
RestClient::Resource.new(@service_url).put :account => {:db_url => @config_vars['DATABASE_URL']}
I know it sends a put REST request, but how is the :account => {:db_url => @config_vars['DATABASE_URL']}
part sent. I mean, what will the body of the request be like?
thanks
Upvotes: 0
Views: 856
Reputation: 29032
The request body of the PUT request will be JSON:
"account": {
"db_url": <whatever @config_vars['DATABASE_URL'] is>
}
Upvotes: 1