def request(service, path, options={})
http_method = options[:http_method] || :get
@request_url = options[:softlayer_api_url] || Fog::Softlayer::SL_API_URL
credentialize_url(@credentials[:username], @credentials[:api_key])
set_sl_service(service)
set_sl_path(path)
params = { :headers => user_agent_header }
params[:headers]['Content-Type'] = 'application/json'
params[:expects] = options[:expected] || [200,201]
params[:body] = Fog::JSON.encode({:parameters => [ options[:body] ]}) unless options[:body].nil?
params[:query] = options[:query] unless options[:query].nil?
@connection = Fog::Core::Connection.new(@request_url, false, params)
response = @connection.request(:method => http_method)
response.body = Fog::JSON.decode(response.body)
response
end