Simplify CARTO::SGMAP::API.call
This commit is contained in:
parent
5df4e3305e
commit
a18af4e616
1 changed files with 2 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue