user3242743
user3242743

Reputation: 1851

RAILS :RESTclient request body

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

Answers (1)

ddavison
ddavison

Reputation: 29032

The request body of the PUT request will be JSON:

"account": {
  "db_url": <whatever @config_vars['DATABASE_URL'] is>
}

Upvotes: 1

Related Questions