Syntactical sugar for making GET requests via the API.
 @see #execute
513018
def get(path: nil, headers: {}, query: {})
      execute(method: :get, path: path, query: query, headers: headers)
    end
815540
public QueryResponse executeQueryPost(Query query) throws ApiException {
        ApiResponse<QueryResponse> resp = executeQueryPostWithHttpInfo(query);
        return resp.getData();
    }
28745
def execute(self, *args, **kwargs):
        
        _verbose = kwargs.pop('_verbose', False)
        return_full_object = kwargs.pop('return_full_object', False)
        variables = self.variables().fill(*args, **kwargs)
        return Request(self, variables).send(
            traversal=self.traversal,
            _verbose=_verbose,
            return_full_object=return_full_object,
            _timeout=self.timeout
        )
819222
function execute(req, res) {

  // if we have a sparse db store we need
  // to ensure a database exists
  if(!this.store.databases[req.args[0]]) {
    this.store.getDatabase(req.args[0], {pattern: this.pattern});
  }

  // update the connection with their selected db index
  req.conn.db = req.args[0];

  res.send(null, Constants.OK);
}
707533
def execute
      request = Net::HTTP::Get.new(@endpoint.path)
      request.add_field('Content-Type', 'application/soap+xml')
      MexResponse.parse(http(@endpoint).request(request).body)
    end
805855
function execute(req, res) {
  ScriptManager.evalsha(req, res, '' + req.args[0], req.args.slice(1));
}
964372
def execute
      # Here is the order of operations:
      # -> setting @data_sent
      # -> executing before_request_execution callback
      # -> executing the HTTP request
      # -> setting @response
      # -> setting @data_received
      # -> executing after_request_execution callback

      # Setting @data_sent
      params = Rack::Utils.parse_nested_query(URI.parse(@http_request.path).query)
      # Since that's how it will be interpreted anyway on the server, we merge the POST params to the GET params,
      # but it's not supposed to happen: either every params is prepared for GET/query params, or as POST body
      params.merge!(Rack::Utils.parse_nested_query(@http_request.body.to_s))

      # About: Hash[{}.map{|k,v| [k, v.join] }]
      # it transforms the following hash:
      # {"accept"=>["*/*"], "user-agent"=>["TheBigDB RubyWrapper/X.Y.Z"], "host"=>["computer.host"]}
      # into the following hash:
      # {"accept"=>"*/*", "user-agent"=>"TheBigDB RubyWrapper/X.Y.Z", "host"=>"computer.host"}
      # which is way more useful and cleaner.
      @data_sent = {
        "headers" => Hash[@http_request.to_hash.map{|k,v| [k, v.join] }],
        "host" => @http.address,
        "port" => @http.port,
        "path" => URI.parse(@http_request.path).path,
        "method" => @http_request.method,
        "params" => params
      }

      # Executing callback
      TheBigDB.before_request_execution.call(self)

      # Here is where the request is actually executed
      @http_response = TheBigDB.http_request_executor.call(@http, @http_request)

      # Setting @response
      begin
        # We parse the JSON answer and return it.
        @response = JSON(@http_response.body)
      rescue JSON::ParserError => e
        @response = {"status" => "error", "error" => {"code" => "0000", "description" => "The server gave an invalid JSON body:\n#{@http_response.body}"}}
      end

      # Setting @data_received
      @data_received = {
        "headers" => Hash[@http_response.to_hash.map{|k,v| [k, v.join] }],
        "content" => @response
      }

      # Executing callback
      TheBigDB.after_request_execution.call(self)

      # Raising exception if asked
      if TheBigDB.raise_on_api_status_error and @response["status"] == "error"
        raise ApiStatusError.new(@response["error"]["code"])
      end

      self
    end
1281237
def execute_as_string(http_request)
      response = @connection.send(
        http_request.http_method.downcase,
        http_request.query_url
      ) do |request|
        request.headers = http_request.headers
        unless http_request.parameters.empty?
          request.body = http_request.parameters
        end
      end
      convert_response(response)
    end
1356356
@SuppressWarnings("unchecked")
    @Override
    public Boolean execute() {
        validateCommand();
        User sender = CommandUtil.getSfsUser(user, api);
        sender = sender != null ? sender : newFakeUser();
        ISFSObject params = createResponseParams();
        getRequestHandler().handleClientRequest(sender, params);
        return Boolean.TRUE;
    }
874462
function(s_query) {

			// execute function
			var f_exec = function(f_okay) {
				submit_query(s_query, f_okay);
			};

			var d_self = {
				exec: f_exec,
				results: function(f_okay) {
					f_exec(function(h_res) {
						f_okay && f_okay(h_res.results.bindings);
					});
				},
				each: function(f_each, f_okay) {
					f_exec(function(h_res) {
						if(!f_each) return;
						var a_rows = h_res.results.bindings;
						for(var i=0,l=a_rows.length; i<l; i++) {
							var h_row = a_rows[i];
							var h_this = {};
							for(var e in h_row) h_this[e] = h_row[e].value;
							f_each.apply(h_this, [i, h_row]);
						}
						f_okay && f_okay();
					});
				},
			};

			return d_self;
		}
919365
def make_api_call(self, method, url, json_params=None):
        

        url = self.BRANCH_BASE_URI+url

        if self.verbose is True:
            print("Making web request: {}".format(url))

        if json_params is not None:
            encoded_params = json.dumps(json_params)
            headers = {'Content-Type': 'application/json'}
        else:
            encoded_params = None
            headers = {}

        if encoded_params is not None and self.verbose is True:
            print("Params: {}".format(encoded_params))

        request = Request(url, encoded_params.encode('utf-8'), headers)
        request.get_method = lambda: method
        response = urlopen(request).read()
        return json.loads(response.decode('utf-8'))
511567
public String exec(String apiPath, String method, String query, Object payload, boolean needAuth)
			throws IOException {
		if (payload == null)
			payload = "";

		String responseText = null;

		boolean cached = false;
		if (cacheManager != null) {
			responseText = cacheManager.getCache(apiPath, method, query, payload);
			if (responseText != null)
				cached = true;
		}

		if (responseText == null)
			try {
				responseText = execInternal(method, query, payload, needAuth);
			} catch (OvhException e0) {
				throw e0;
			} catch (OvhServiceException e0) {
				throw e0;
			} catch (SocketTimeoutException e1) {
				log.error("calling {} {} Failed by timeout. (ConnectTimeout:{} ReadTimeout:{})", method, query,
						config.getConnectTimeout(), config.getReadTimeout());
				responseText = execInternal(method, query, payload, needAuth);
			} catch (IOException e2) {
				log.error("API OVH IOException", e2);
				throw e2;
			}
		if (cacheManager != null && !cached)
			cacheManager.setCache(apiPath, method, query, payload, responseText);

		if (mtdHandler != null) {
			for (String mtd : new String[] { method, "ALL" }) {
				TreeMap<String, OphApiHandler> handlers = null;
				OphApiHandler handler = null;
				handlers = mtdHandler.get(mtd);
				if (handlers == null)
					continue;
				handler = handlers.get(apiPath);
				if (handler == null)
					continue;
				try {
					handler.accept(method, method, payload, responseText);
				} catch (Exception e) {
					log.warn("Handler throw exeption on {} {} : {}", method, method, e);
				}
			}
		}
		return responseText;
	}
256443
def get(url, parameters = {}, skip_status_check = false)
      response = connection.get("#{api_endpoint}#{url}", parameters)
      on_complete(response) unless skip_status_check
      response
    end
562654
function execute(method, params) {
  var output = !params ? [] : params;

  if (method == "getStandardEvents") {
    return new Promise(function promise(resolve, reject) {
      resolve(standardEvent);  
    });
  }

  return new Promise(function promise(resolve, reject) {
    exec(
      function success(res) {
        resolve(res);
      },
      function failure(err) {
        reject(err);
      },
      API_CLASS,
      method,
      output
    );
  });
}
599488
function executeController(server, controller, req, res) {
    try {
        const promise = controller.call(server, req, res);
        if (promise && typeof promise.catch === 'function') {
            promise.catch(function(err) {
                res.status(500).send(err);
            });
        }
    } catch (err) {
        res.send(err);
    }
}
1093215
@SuppressWarnings("unchecked")
    public ApiBuddy execute() {
        User sfsOwner = api.getUserByName(owner);
        ApiUser targetUser = getUser(target);
        ApiUser ownerUser = (ApiUser) sfsOwner.getProperty(APIKey.USER);
        ISFSBuddyResponseApi responseAPI = SmartFoxServer.getInstance().getAPIManager()
                .getBuddyApi().getResponseAPI();
        ISFSEventManager eventManager = SmartFoxServer.getInstance().getEventManager();
        BuddyList buddyList = sfsOwner.getZone()
                .getBuddyListManager().getBuddyList(owner);
        BuddyListManager buddyListManager = sfsOwner.getZone().getBuddyListManager();
        checkBuddyManagerIsActive(buddyListManager, sfsOwner);
        sfsOwner.updateLastRequestTime();
        ApiBuddyImpl buddy = new ApiBuddyImpl(target, temp);
        buddy.setOwner(ownerUser);
        buddy.setParentBuddyList(buddyList);
        if(targetUser != null)  buddy.setUser(targetUser);
        try {
            buddyList.addBuddy(buddy);
            if (fireClientEvent)
                responseAPI.notifyAddBuddy(buddy, sfsOwner);
            if (fireServerEvent) {
                Map<ISFSEventParam, Object> evtParams = new HashMap<>();
                evtParams.put(SFSEventParam.ZONE, sfsOwner.getZone());
                evtParams.put(SFSEventParam.USER, sfsOwner);
                evtParams.put(SFSBuddyEventParam.BUDDY, buddy);
                eventManager.dispatchEvent(new SFSEvent(SFSEventType.BUDDY_ADD, evtParams));
            }
        } catch (SFSBuddyListException e) {
            if (fireClientEvent) {
                api.getResponseAPI().notifyRequestError(e, sfsOwner, SystemRequest.AddBuddy);
            }
            return null;
        }
        return buddy;
    }
294496
function execute(req, res) {
  var scanner = new Scanner(
    req.db.getKeys(), req.info.cursor, req.info.pattern, req.info.count);
  scanner.scan(req, res);
}