]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/http.tex
Fix wxBufferedDC so that it adheres to its documented behavior (which is in use in...
[wxWidgets.git] / docs / latex / wx / http.tex
... / ...
CommitLineData
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% ----------------------------------------------------------------------------
20\membersection{wxHTTP::GetResponse}\label{wxhttpgetresponse}
21
22\constfunc{int}{GetResponse}{\void}
23
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.
26
27
28\membersection{wxHTTP::GetInputStream}\label{wxhttpgetinputstream}
29
30\func{wxInputStream *}{GetInputStream}{\param{const wxString\&}{ path}}
31
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.
34
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.
41
42\wxheading{Return value}
43
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.
49
50\wxheading{See also}
51
52\helpref{wxInputStream}{wxinputstream}
53
54% ----------------------------------------------------------------------------
55
56\membersection{wxHTTP::SetHeader}\label{wxhttpsetheader}
57
58\func{void}{SetHeader}{\param{const wxString\&}{ header}, \param{const wxString\&}{ h\_data}}
59
60It sets data of a field to be sent during the next request to the HTTP server. The field
61name is specified by {\it header} and the content by {\it h\_data}.
62This is a low level function and it assumes that you know what you are doing.
63
64\membersection{wxHTTP::GetHeader}\label{wxhttpgetheader}
65
66\func{wxString}{GetHeader}{\param{const wxString\&}{ header}}
67
68Returns the data attached with a field whose name is specified by {\it header}.
69If the field doesn't exist, it will return an empty string and not a NULL string.
70
71\wxheading{Note}
72
73The header is not case-sensitive, i.e. "CONTENT-TYPE" and "content-type"
74represent the same header.
75