This wiki is archived and useful information is being migrated to the main bzflag.org website

bz addURLJob

From BZFlagWiki
Jump to: navigation, search
BZFS API Documentation This page contains part of the BZFS API documentation for use by Plug-ins on the BZFS server.
BZFS API Function. This page documents a BZFS_API Function, that is provided by the BZFS game server for plug-ins to call.

Syntax[edit]

BZF_API bool bz_addURLJob(const char* URL, bz_BaseURLHandler* handler = NULL, const char* postData = NULL);

Parameters[edit]

  • URL: The URL to call.
  • handler : Optional callback class to get the status and return code for the URL request. If the item is null, then the response from the resource is ignored.
  • postData : Null terminated data block to send as the body of the request as an HTTP post action. If this item is NULL then the request is done as an HTTP GET.

Returns[edit]

Returns true if the job was added to the job list.

Description[edit]

This function is used to send out HTTP requests from bzfs to external websites. It can be used to send data to a site, or request data from a site. It will transfer the data in the background and call the handler parameter as the data is updated.

See Also[edit]

bz_BaseURLHandler