ScummVM API documentation
Networking::PostRequest Class Reference
Inheritance diagram for Networking::PostRequest:
Networking::Request

Public Member Functions

 PostRequest (const Common::String &url, Networking::JSONValueCallback cb, Networking::ErrorCallback ecb)
 
void start ()
 
void setPostData (byte *postData, int postLen)
 
void setJSONData (Common::JSONValue *jsonData)
 
void setContentType (const Common::String &type)
 
void handle () override
 
void restart () override
 
Common::String date () const override
 
- Public Member Functions inherited from Networking::Request
 Request (DataCallback cb, ErrorCallback ecb)
 
virtual void handleRetry ()
 
virtual void pause ()
 
virtual void finish ()
 
virtual void retry (uint32 seconds)
 
RequestState state () const
 

Additional Inherited Members

- Protected Member Functions inherited from Networking::Request
virtual void finishError (const ErrorResponse &error, RequestState state=FINISHED)
 
virtual void finishSuccess ()
 
- Protected Attributes inherited from Networking::Request
DataCallback _callback
 
ErrorCallback _errorCallback
 
RequestState _state
 
uint32 _retryInSeconds
 

Member Function Documentation

◆ handle()

void Networking::PostRequest::handle ( )
overridevirtual

Method, which does actual work. Depends on what this Request is doing.

Implements Networking::Request.

◆ restart()

void Networking::PostRequest::restart ( )
overridevirtual

Method, which is used to restart the Request.

Implements Networking::Request.

◆ date()

Common::String Networking::PostRequest::date ( ) const
overridevirtual

Return date this Request received from server. It could be extracted from "Date" header, which is kept in NetworkReadStream.

Note
not all Requests do that, so "" is returned to indicate the date is unknown. That's also true if no server response available or no "Date" header was passed.
Returns
date from "Date" response header.

Reimplemented from Networking::Request.


The documentation for this class was generated from the following file: