Replaced Net::HTTP with RestClient because of trouble with nested parameters in POST requests.