def make_request_async(base_url, method, path, options = {})
      options = @middlewares.merge(options)
      options[:credentials] = options[:credentials] || @credentials
      options[:user_agent_extended] = @user_agent_extended
      request  = MsRest::HttpOperationRequest.new(base_url, path, method, options)
      promise = request.run_promise do |req|
        options[:credentials].sign_request(req) unless options[:credentials].nil?
      end
      promise = promise.then do |http_response|
        response_content = http_response.body.to_s.empty? ? nil : http_response.body
        # Create response
        create_response(request, http_response, response_content)
      end
      promise.execute
    end
def make_request_async(base_url, method, path, options = {})
      options = @middlewares.merge(options)
      options[:credentials] = options[:credentials] || @credentials
      options[:user_agent_extended] = @user_agent_extended
      request  = MsRest::HttpOperationRequest.new(base_url, path, method, options)
      promise = request.run_promise do |req|
        options[:credentials].sign_request(req) unless options[:credentials].nil?
      end
      promise = promise.then do |http_response|
        response_content = http_response.body.to_s.empty? ? nil : http_response.body
        # Create response
        create_response(request, http_response, response_content)
      end
      promise.execute
    end
Creates and initialize new instance of the ServiceClient class.

 @param credentials [MsRest::ServiceClientCredentials] credentials to authorize
 HTTP requests made by the service client.
 @param options additional parameters for the HTTP request (not implemented yet).


 @param base_url [String] the base url for the request.
 @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
 @param path [String] the path, relative to {base_url}.
 @param options [Hash{String=>String}] specifying any request options like :credentials, :body, etc.
 @return [Concurrent::Promise] Promise object which holds the HTTP response.