Rename wxWebSession::SetHeader() to AddCommonHeader()
The old name wasn't very clear and it was confusing to have methods with the same name in wxWebSession and wxWebRequest.
This commit is contained in:
@@ -205,7 +205,7 @@ public:
|
||||
|
||||
virtual wxVersionInfo GetLibraryVersionInfo() = 0;
|
||||
|
||||
void SetHeader(const wxString& name, const wxString& value)
|
||||
void AddCommonHeader(const wxString& name, const wxString& value)
|
||||
{ m_headers[name] = value; }
|
||||
|
||||
void SetTempDir(const wxString& dir) { m_tempDir = dir; }
|
||||
|
@@ -220,7 +220,7 @@ public:
|
||||
|
||||
wxVersionInfo GetLibraryVersionInfo();
|
||||
|
||||
void SetHeader(const wxString& name, const wxString& value);
|
||||
void AddCommonHeader(const wxString& name, const wxString& value);
|
||||
|
||||
void SetTempDir(const wxString& dir);
|
||||
wxString GetTempDir() const;
|
||||
|
@@ -581,10 +581,13 @@ public:
|
||||
A good example for a session-wide request header is the @c User-Agent
|
||||
header.
|
||||
|
||||
Calling this function with the same header name again replaces the
|
||||
previously used value.
|
||||
|
||||
@param name Name of the header
|
||||
@param value String value of the header
|
||||
*/
|
||||
void SetHeader(const wxString& name, const wxString& value);
|
||||
void AddCommonHeader(const wxString& name, const wxString& value);
|
||||
|
||||
/**
|
||||
Override the default temporary directory that may be used by the
|
||||
|
@@ -773,7 +773,7 @@ wxStringWebSessionFactoryMap gs_factoryMap;
|
||||
wxWebSessionImpl::wxWebSessionImpl()
|
||||
{
|
||||
// Initialize the user-Agent header with a reasonable default
|
||||
SetHeader("User-Agent", wxString::Format("%s/1 wxWidgets/%d.%d.%d",
|
||||
AddCommonHeader("User-Agent", wxString::Format("%s/1 wxWidgets/%d.%d.%d",
|
||||
wxTheApp->GetAppName(),
|
||||
wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER));
|
||||
}
|
||||
@@ -889,11 +889,11 @@ wxVersionInfo wxWebSession::GetLibraryVersionInfo()
|
||||
return m_impl->GetLibraryVersionInfo();
|
||||
}
|
||||
|
||||
void wxWebSession::SetHeader(const wxString& name, const wxString& value)
|
||||
void wxWebSession::AddCommonHeader(const wxString& name, const wxString& value)
|
||||
{
|
||||
wxCHECK_IMPL_VOID();
|
||||
|
||||
m_impl->SetHeader(name, value);
|
||||
m_impl->AddCommonHeader(name, value);
|
||||
}
|
||||
|
||||
void wxWebSession::SetTempDir(const wxString& dir)
|
||||
|
Reference in New Issue
Block a user