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