Simplify CARTO::SGMAP::API.call

This commit is contained in:
gregoirenovel 2018-10-15 15:50:23 +02:00
parent 5df4e3305e
commit a18af4e616

View file

@ -18,10 +18,8 @@ class CARTO::SGMAP::API
verify_ssl_mode = OpenSSL::SSL::VERIFY_NONE
params = geojson.to_s
RestClient::Resource.new(
url,
verify_ssl: verify_ssl_mode
).post(params, content_type: 'application/json')
client = RestClient::Resource.new(url, verify_ssl: verify_ssl_mode)
client.post(params, content_type: 'application/json')
rescue RestClient::InternalServerError
raise RestClient::ResourceNotFound