1999-02-26 13:51:51 -05:00
|
|
|
\section{\class{wxHTTP}}\label{wxhttp}
|
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
2007-08-15 09:27:12 -04:00
|
|
|
\helpref{wxProtocol}{wxprotocol}\\
|
|
|
|
\helpref{wxSocketClient}{wxsocketclient}\\
|
|
|
|
\helpref{wxSocketBase}{wxsocketbase}\\
|
|
|
|
\helpref{wxObject}{wxobject}
|
1999-02-26 13:51:51 -05:00
|
|
|
|
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/protocol/http.h>
|
|
|
|
|
2007-07-28 08:21:03 -04:00
|
|
|
\wxheading{Library}
|
|
|
|
|
|
|
|
\helpref{wxNet}{librarieslist}
|
|
|
|
|
1999-02-26 13:51:51 -05:00
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSocketBase}{wxsocketbase}, \helpref{wxURL}{wxurl}
|
|
|
|
|
|
|
|
% ----------------------------------------------------------------------------
|
|
|
|
% Members
|
|
|
|
% ----------------------------------------------------------------------------
|
|
|
|
|
2007-08-21 10:20:28 -04:00
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
1999-02-26 13:51:51 -05:00
|
|
|
% ----------------------------------------------------------------------------
|
2003-09-20 19:55:32 -04:00
|
|
|
\membersection{wxHTTP::GetResponse}\label{wxhttpgetresponse}
|
|
|
|
|
|
|
|
\constfunc{int}{GetResponse}{\void}
|
|
|
|
|
2006-02-13 10:18:35 -05:00
|
|
|
Returns the HTTP response code returned by the server. Please refer to
|
|
|
|
\urlref{RFC 2616}{http://www.faqs.org/rfcs/rfc2616.html} for the list of responses.
|
2003-09-20 19:55:32 -04:00
|
|
|
|
|
|
|
|
1999-02-26 17:22:13 -05:00
|
|
|
\membersection{wxHTTP::GetInputStream}\label{wxhttpgetinputstream}
|
1999-02-26 13:51:51 -05:00
|
|
|
|
|
|
|
\func{wxInputStream *}{GetInputStream}{\param{const wxString\&}{ path}}
|
|
|
|
|
2006-08-09 17:23:56 -04:00
|
|
|
Creates a new input stream on the specified path. Notice that this stream is
|
|
|
|
unseekable, i.e. SeekI() and TellI() methods shouldn't be used.
|
1999-02-26 13:51:51 -05:00
|
|
|
|
2006-08-09 17:23:56 -04:00
|
|
|
Note that you can still know the size of the file you are getting using
|
|
|
|
\helpref{wxStreamBase::GetSize()}{wxstreambasegetsize}. However there is a
|
|
|
|
limitation: in HTTP protocol, the size is not always specified so sometimes
|
|
|
|
\texttt{(size\_t)-1} can returned ot indicate that the size is unknown. In such
|
|
|
|
case, you may want to use \helpref{wxInputStream::LastRead()}{wxinputstreamlastread}
|
|
|
|
method in a loop to get the total size.
|
1999-07-30 13:54:18 -04:00
|
|
|
|
1999-02-26 13:51:51 -05:00
|
|
|
\wxheading{Return value}
|
|
|
|
|
2006-08-09 17:23:56 -04:00
|
|
|
Returns the initialized stream. You must delete it yourself once you
|
|
|
|
don't use it anymore and this must be done before the wxHTTP object itself is
|
|
|
|
destroyed. The destructor closes the network connection. The next time you will
|
|
|
|
try to get a file the network connection will have to be reestablished, but you
|
|
|
|
don't have to take care of this since wxHTTP reestablishes it automatically.
|
1999-02-26 13:51:51 -05:00
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxInputStream}{wxinputstream}
|
|
|
|
|
|
|
|
% ----------------------------------------------------------------------------
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxHTTP::SetHeader}\label{wxhttpsetheader}
|
1999-02-26 13:51:51 -05:00
|
|
|
|
1999-03-13 15:14:37 -05:00
|
|
|
\func{void}{SetHeader}{\param{const wxString\&}{ header}, \param{const wxString\&}{ h\_data}}
|
1999-02-26 13:51:51 -05:00
|
|
|
|
|
|
|
It sets data of a field to be sent during the next request to the HTTP server. The field
|
1999-12-24 18:40:13 -05:00
|
|
|
name is specified by {\it header} and the content by {\it h\_data}.
|
1999-02-26 13:51:51 -05:00
|
|
|
This is a low level function and it assumes that you know what you are doing.
|
|
|
|
|
2004-09-29 07:25:34 -04:00
|
|
|
\membersection{wxHTTP::GetHeader}\label{wxhttpgetheader}
|
1999-02-26 17:22:13 -05:00
|
|
|
|
1999-02-26 13:51:51 -05:00
|
|
|
\func{wxString}{GetHeader}{\param{const wxString\&}{ header}}
|
|
|
|
|
1999-12-24 18:40:13 -05:00
|
|
|
Returns the data attached with a field whose name is specified by {\it header}.
|
1999-02-26 13:51:51 -05:00
|
|
|
If the field doesn't exist, it will return an empty string and not a NULL string.
|
1999-02-26 17:22:13 -05:00
|
|
|
|
1999-07-30 13:54:18 -04:00
|
|
|
\wxheading{Note}
|
|
|
|
|
2006-02-13 10:18:35 -05:00
|
|
|
The header is not case-sensitive, i.e. "CONTENT-TYPE" and "content-type"
|
1999-07-30 13:54:18 -04:00
|
|
|
represent the same header.
|
1999-08-05 18:05:15 -04:00
|
|
|
|