lib/bubbles/config.rb in bubbles-rest-client-0.3.0 vs lib/bubbles/config.rb in bubbles-rest-client-0.3.1

- old
+ new

@@ -280,19 +280,15 @@ end end elsif endpoint.api_key_required? Bubbles::RestEnvironment.class_exec do if endpoint.has_uri_params? - define_method(endpoint_name_as_sym) do |api_key, uri_params| - additional_headers = {} - additional_headers['X-Api-Key'] = api_key - RestClientResources.execute_head_unauthenticated self, endpoint, uri_params, additional_headers + define_method(endpoint_name_as_sym) do |uri_params| + RestClientResources.execute_head_unauthenticated_with_uri_params self, endpoint, self.api_key, uri_params end else - define_method(endpoint_name_as_sym) do |api_key| - additional_headers = {} - additional_headers['X-Api-Key'] = api_key - RestClientResources.execute_head_unauthenticated self, endpoint, {}, additional_headers + define_method(endpoint_name_as_sym) do + RestClientResources.execute_head_unauthenticated self, endpoint, self.api_key, nil end end end else Bubbles::RestEnvironment.class_exec do