lib/gotransverse-tract-api.rb in gotransverse-tract-api-0.6.6 vs lib/gotransverse-tract-api.rb in gotransverse-tract-api-0.6.7

- old
+ new

@@ -188,10 +188,12 @@ # @param {Hash} api_params (optional) # @param {Hash} request_body # def self.delete_request_for(klass, api_params={}, request_body) api_url = GoTransverseTractApi.get_api_url_for(klass) + api_url = api_url + "/#{api_params[:eid]}" + self.call(klass, api_url, api_params, :delete, request_body) end # # Generate XML for request body @@ -266,10 +268,9 @@ when :post response = http_client.post(api_url, request_body, {'Content-Type' => 'application/xml', 'Accept' => 'application/xml'}) when :put response = http_client.put(api_url, request_body, api_params) when :delete - api_url = api_url + "/#{api_params[:eid]}" response = http_client.delete(api_url, request_body, {'Content-Type' => 'application/xml', 'Accept' => 'application/xml'}) end return nil unless response.body.to_s.present?