Overview

Namespaces

  • Budabot
    • Core
      • Modules
    • User
      • Modules
  • None
  • Tyrence
    • Modules

Classes

  • AccessManager
  • AdminManager
  • AOChat
  • AOChatPacket
  • AOChatQueue
  • AOExtMsg
  • AsyncHttp
  • AutoInject
  • BotRunner
  • Budabot
  • BuddylistManager
  • CacheManager
  • CacheResult
  • ClassLoader
  • ColorSettingHandler
  • CommandAlias
  • CommandManager
  • ConfigFile
  • DB
  • DBRow
  • EventLoop
  • EventManager
  • GuildChannelCommandReply
  • GuildManager
  • HelpManager
  • Http
  • HttpRequest
  • LegacyLogger
  • LimitsController
  • LoggerWrapper
  • MMDBParser
  • NumberSettingHandler
  • OptionsSettingHandler
  • PlayerHistory
  • PlayerHistoryManager
  • PlayerManager
  • Preferences
  • PrivateChannelCommandReply
  • PrivateMessageCommandReply
  • Registry
  • SettingHandler
  • SettingManager
  • SettingObject
  • SocketManager
  • SocketNotifier
  • SubcommandManager
  • Text
  • TextSettingHandler
  • Timer
  • TimerEvent
  • TimeSettingHandler
  • Util
  • xml

Interfaces

  • CommandReply

Exceptions

  • InvalidHttpRequest
  • SQLException
  • StopExecutionException

Functions

  • isWindows
  • Overview
  • Namespace
  • Class

Class Http

Namespace: Budabot\Core
Instance
Located at Http.php
Methods summary
public Budabot\Core\AsyncHttp
# get( string $uri )

Requests contents of given $uri using GET method and returns AsyncHttp object which has additional methods for controlling how the query is done.

Requests contents of given $uri using GET method and returns AsyncHttp object which has additional methods for controlling how the query is done.

You can get both HTTP and HTTPS URIs with method.

For more info, see AsyncHttp class.

Asynchronous example:

$this->http->get("http://www.google.com/")->withCallback(function($response) {
    print $response->body;
});

Synchronous example:

$response = $this->http->get("http://www.google.com/")->waitAndReturnResponse();
print $response->body;

Parameters

$uri
the requested URI

Returns

Budabot\Core\AsyncHttp
public Budabot\Core\AsyncHttp
# post( string $uri )

Requests contents of given $uri using POST method and returns AsyncHttp object which has additional methods for controlling how the query is done.

Requests contents of given $uri using POST method and returns AsyncHttp object which has additional methods for controlling how the query is done.

See get() for code example.

Parameters

$uri
the requested URI

Returns

Budabot\Core\AsyncHttp
Properties summary
public $timer

Inject

#
Budabot 4 Docs API documentation generated by ApiGen