Skip to content

Commit

Permalink
Fix various types and style in wxWebRequest documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
catalinr authored and TcT2k committed Oct 17, 2018
1 parent 0bdf06a commit 4a7599e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
40 changes: 20 additions & 20 deletions interface/wx/webrequest.h
Expand Up @@ -12,7 +12,7 @@
components as implementation.
The latest features of the operating system will be used if available
(e.g. HTTP/2, TLS 1.2).
(e.g. HTTP/2, TLS 1.3).
System wide configuration like proxy and SSL certificates will be used
when possible.
Expand Down Expand Up @@ -108,7 +108,7 @@ class wxWebRequest: public wxEvtHandler, public wxRefCounter
/**
Adds a request header send by this request.
@param name Name if the header
@param name Name of the header
@param value String value of the header
*/
void AddHeader(const wxString& name, const wxString& value);
Expand Down Expand Up @@ -159,10 +159,10 @@ class wxWebRequest: public wxEvtHandler, public wxRefCounter
/**
Instructs the request to ignore server error status codes.
Per default server side errors (status code 500-599) will be send
Per default, server side errors (status code 500-599) will send
a wxEVT_WEBREQUEST_FAILED event just like network errors, but
if the response is still required in this cases (e.g. to get more
details from the response body) this may be set to ignore these.
details from the response body), set this option to ignore all errors.
If ignored wxWebRequestResponse::GetStatus() has to be checked
from the wxEVT_WEBREQUEST_READY event handler.
*/
Expand All @@ -171,14 +171,14 @@ class wxWebRequest: public wxEvtHandler, public wxRefCounter
/**
Send the request to the server asynchronously.
Events will be triggered on success or failure
Events will be triggered on success or failure.
@see Cancel()
*/
void Start();

/**
Cancel an active request
Cancel an active request.
*/
void Cancel();

Expand All @@ -204,25 +204,25 @@ class wxWebRequestResponse
/**
Returns the final URL.
This URL might be different than the request URL when a redirection
occured.
occurred.
*/
wxString GetURL() const;

/**
Return a header from the response or an empty string if the header
Returns a header from the response or an empty string if the header
could not be found.
@param name Name of the header field
*/
wxString GetHeader(const wxString& name) const;

/**
Returns the status code returned by the server
Returns the status code returned by the server.
*/
int GetStatus() const;

/**
Returns the response status text
Returns the status text of the response.
*/
wxString GetStatusText() const;

Expand All @@ -235,16 +235,16 @@ class wxWebRequestResponse
Returns all response data as a string.
@param conv wxMBConv used to convert the response to a string.
If @c NULL the conversion will be determined by
response headers. Defaulting to UTF-8
If @c NULL, the conversion will be determined by
response headers. The default is UTF-8.
*/
wxString AsString(wxMBConv* conv = NULL) const;
};

/**
@class wxWebRequestSession
This class handles session wide parameters and data used by wxWebRequest
This class handles session-wide parameters and data used by wxWebRequest
instances.
Usually the default session available via wxWebRequestSession::GetDefault()
Expand All @@ -253,7 +253,7 @@ class wxWebRequestResponse
request has finished.
Every wxWebRequest sharing the same session object will use the same
cookies. Additionally an underlying network connection might be kept
cookies. Additionally, an underlying network connection might be kept
alive to achieve faster additional responses.
@since 3.1.2
Expand All @@ -280,7 +280,7 @@ class wxWebRequestSession
@param url
The URL of the HTTP resource for this request
@param id
Optional id send with events
Optional id sent with events
*/
wxWebRequest* CreateRequest(const wxString& url, int id = wxID_ANY);

Expand All @@ -291,12 +291,12 @@ class wxWebRequestSession
static wxWebRequestSession* GetDefault();

/**
Adds a request header send by every wxWebRequest using this session.
Adds a request header to every wxWebRequest using this session.
A good example for a session wide request header is the @c User-Agent
A good example for a session-wide request header is the @c User-Agent
header.
@param name Name if the header
@param name Name of the header
@param value String value of the header
*/
void AddRequestHeader(const wxString& name, const wxString& value);
Expand All @@ -305,7 +305,7 @@ class wxWebRequestSession
/**
@class wxWebRequestEvent
A web request event send during or after server communication.
A web request event sent during or after server communication.
@since 3.1.2
Expand All @@ -327,7 +327,7 @@ class wxWebRequestEvent : public wxEvent

/**
A textual error description for a client side error
wxEVT_WEBREQUEST_FAILED
in case of wxEVT_WEBREQUEST_FAILED
*/
const wxString& GetErrorDescription() const;
};
Expand Down
2 changes: 1 addition & 1 deletion samples/webrequest/webrequest.cpp
Expand Up @@ -138,7 +138,7 @@ class WebRequestApp : public wxApp
public:
virtual bool OnInit() wxOVERRIDE
{
if (!wxApp::OnInit())
if ( !wxApp::OnInit() )
return false;

// create the main application window
Expand Down

0 comments on commit 4a7599e

Please sign in to comment.