]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/http.tex
added wxWindow::AlwaysShowScrollbars() and its wxMac implementation
[wxWidgets.git] / docs / latex / wx / http.tex
CommitLineData
0d6957a5
GL
1\section{\class{wxHTTP}}\label{wxhttp}
2
3\wxheading{Derived from}
4
7376079d
VZ
5\helpref{wxProtocol}{wxprotocol}\\
6\helpref{wxSocketClient}{wxsocketclient}\\
7\helpref{wxSocketBase}{wxsocketbase}\\
8\helpref{wxObject}{wxobject}
0d6957a5
GL
9
10\wxheading{Include files}
11
12<wx/protocol/http.h>
13
a7af285d
VZ
14\wxheading{Library}
15
16\helpref{wxNet}{librarieslist}
17
0d6957a5
GL
18\wxheading{See also}
19
20\helpref{wxSocketBase}{wxsocketbase}, \helpref{wxURL}{wxurl}
21
22% ----------------------------------------------------------------------------
23% Members
24% ----------------------------------------------------------------------------
25
809e21b5
FM
26\latexignore{\rtfignore{\wxheading{Members}}}
27
0d6957a5 28% ----------------------------------------------------------------------------
2e622163
VZ
29\membersection{wxHTTP::GetResponse}\label{wxhttpgetresponse}
30
31\constfunc{int}{GetResponse}{\void}
32
4e43c815
VZ
33Returns the HTTP response code returned by the server. Please refer to
34\urlref{RFC 2616}{http://www.faqs.org/rfcs/rfc2616.html} for the list of responses.
2e622163
VZ
35
36
721b32e0 37\membersection{wxHTTP::GetInputStream}\label{wxhttpgetinputstream}
0d6957a5
GL
38
39\func{wxInputStream *}{GetInputStream}{\param{const wxString\&}{ path}}
40
034ad063
VZ
41Creates a new input stream on the specified path. Notice that this stream is
42unseekable, i.e. SeekI() and TellI() methods shouldn't be used.
0d6957a5 43
034ad063
VZ
44Note that you can still know the size of the file you are getting using
45\helpref{wxStreamBase::GetSize()}{wxstreambasegetsize}. However there is a
46limitation: in HTTP protocol, the size is not always specified so sometimes
47\texttt{(size\_t)-1} can returned ot indicate that the size is unknown. In such
48case, you may want to use \helpref{wxInputStream::LastRead()}{wxinputstreamlastread}
49method in a loop to get the total size.
39b91eca 50
0d6957a5
GL
51\wxheading{Return value}
52
034ad063
VZ
53Returns the initialized stream. You must delete it yourself once you
54don't use it anymore and this must be done before the wxHTTP object itself is
55destroyed. The destructor closes the network connection. The next time you will
56try to get a file the network connection will have to be reestablished, but you
57don't have to take care of this since wxHTTP reestablishes it automatically.
0d6957a5
GL
58
59\wxheading{See also}
60
61\helpref{wxInputStream}{wxinputstream}
62
63% ----------------------------------------------------------------------------
64
f0e8a2d0 65\membersection{wxHTTP::SetHeader}\label{wxhttpsetheader}
0d6957a5 66
294e9a7a 67\func{void}{SetHeader}{\param{const wxString\&}{ header}, \param{const wxString\&}{ h\_data}}
0d6957a5
GL
68
69It sets data of a field to be sent during the next request to the HTTP server. The field
605d715d 70name is specified by {\it header} and the content by {\it h\_data}.
0d6957a5
GL
71This is a low level function and it assumes that you know what you are doing.
72
f0e8a2d0 73\membersection{wxHTTP::GetHeader}\label{wxhttpgetheader}
721b32e0 74
0d6957a5
GL
75\func{wxString}{GetHeader}{\param{const wxString\&}{ header}}
76
605d715d 77Returns the data attached with a field whose name is specified by {\it header}.
0d6957a5 78If the field doesn't exist, it will return an empty string and not a NULL string.
721b32e0 79
39b91eca
GL
80\wxheading{Note}
81
4e43c815 82The header is not case-sensitive, i.e. "CONTENT-TYPE" and "content-type"
39b91eca 83represent the same header.
22d6efa8 84