From 1a5e39606cd461743008a75d1494666638cf4458 Mon Sep 17 00:00:00 2001
From: James Rose <james.rose@melbourne.co.uk>
Date: Fri, 27 Apr 2012 14:31:12 +0100
Subject: [PATCH] Works.

---
 lib/fog/serverlove/compute.rb | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/lib/fog/serverlove/compute.rb b/lib/fog/serverlove/compute.rb
index 8b7f2ffc9..aa4f03e24 100644
--- a/lib/fog/serverlove/compute.rb
+++ b/lib/fog/serverlove/compute.rb
@@ -1,9 +1,7 @@
 module Fog
   module Compute
     class Serverlove < Fog::Service
-      
-      API_URL = "https://api.z1-man.serverlove.com/"
-      
+            
       requires :serverlove_uuid, :serverlove_api_key
       
       recognizes :serverlove_api_url
@@ -29,17 +27,15 @@ module Fog
         def initialize(options)
           @api_uuid = options[:serverlove_uuid] || Fog.credentials[:serverlove_uuid]
           @api_key = options[:serverlove_api_key] || Fog.credentials[:serverlove_api_key]
-          @api_url = options[:serverlove_api_url] || Fog.credentials[:serverlove_api_url] || API_URL
           
-          @connection = Fog::Connection.new(@api_url)
+          @connection = Fog::Connection.new("https://#{@api_uuid}:#{@api_key}@api.z1-man.serverlove.com/")
         end
         
         def request(params)
           params = params.merge!(
             :headers => {
-              "Authorization" => "Basic #{Base64.encode64("#{@api_uuid}:#{@api_key}").chomp!}",
-            },
-            :host => @api_url
+              "Content-Type" => "application/json"
+            }
           )
           response = @connection.request(params)