- case wxHTTP_GET:
- request = wxT("GET");
- break;
-
- case wxHTTP_POST:
- request = wxT("POST");
- // Content length must be correct, so always set, possibly
- // overriding the value set explicitly by a previous call to
- // SetHeader("Content-Length").
- if ( !m_postBuffer.IsEmpty() )
- {
- wxString len;
- len << m_postBuffer.GetDataLen();
-
- SetHeader(wxS("Content-Length"), len);
- }
-
- // However if the user had explicitly set the content type, don't
- // override it with the content type passed to SetPostText().
- if ( !m_contentType.empty() && GetContentType().empty() )
- SetHeader(wxS("Content-Type"), m_contentType);
- break;
-
- default:
- return false;
+ wxString len;
+ len << m_postBuffer.GetDataLen();
+
+ // Content length must be correct, so always set, possibly
+ // overriding the value set explicitly by a previous call to
+ // SetHeader("Content-Length").
+ SetHeader(wxS("Content-Length"), len);
+
+ // However if the user had explicitly set the content type, don't
+ // override it with the content type passed to SetPostText().
+ if ( !m_contentType.empty() && GetContentType().empty() )
+ SetHeader(wxS("Content-Type"), m_contentType);