Subversion Repositories AndroidProjects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
356 chris 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
<!--NewPage-->
3
<HTML>
4
<HEAD>
5
<!-- Generated by javadoc (build 1.6.0_26) on Sun Jan 27 20:37:04 CET 2013 -->
6
<TITLE>
7
Net.HttpRequest (libgdx API)
8
</TITLE>
9
 
10
<META NAME="date" CONTENT="2013-01-27">
11
 
12
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
13
 
14
<SCRIPT type="text/javascript">
15
function windowTitle()
16
{
17
    if (location.href.indexOf('is-external=true') == -1) {
18
        parent.document.title="Net.HttpRequest (libgdx API)";
19
    }
20
}
21
</SCRIPT>
22
<NOSCRIPT>
23
</NOSCRIPT>
24
 
25
</HEAD>
26
 
27
<BODY BGCOLOR="white" onload="windowTitle();">
28
<HR>
29
 
30
 
31
<!-- ========= START OF TOP NAVBAR ======= -->
32
<A NAME="navbar_top"><!-- --></A>
33
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35
<TR>
36
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37
<A NAME="navbar_top_firstrow"><!-- --></A>
38
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39
  <TR ALIGN="center" VALIGN="top">
40
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Net.HttpRequest.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48
  </TR>
49
</TABLE>
50
</TD>
51
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52
 
53
                                libgdx API
54
                                <style>
55
                                body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
56
                                pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
57
                                h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%;  font-weight:bold }
58
                                .TableHeadingColor { background:#EEEEFF; }
59
                                a { text-decoration:none }
60
                                a:hover { text-decoration:underline }
61
                                a:link, a:visited { color:blue }
62
                                table { border:0px }
63
                                .TableRowColor td:first-child { border-left:1px solid black }
64
                                .TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
65
                                hr { border:0px; border-bottom:1px solid #333366; }
66
                                </style>
67
                        </EM>
68
</TD>
69
</TR>
70
 
71
<TR>
72
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
73
&nbsp;<A HREF="../../../com/badlogic/gdx/Net.HttpMethods.html" title="interface in com.badlogic.gdx"><B>PREV CLASS</B></A>&nbsp;
74
&nbsp;<A HREF="../../../com/badlogic/gdx/Net.HttpResponse.html" title="interface in com.badlogic.gdx"><B>NEXT CLASS</B></A></FONT></TD>
75
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
76
  <A HREF="../../../index.html?com/badlogic/gdx/Net.HttpRequest.html" target="_top"><B>FRAMES</B></A>  &nbsp;
77
&nbsp;<A HREF="Net.HttpRequest.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
78
&nbsp;<SCRIPT type="text/javascript">
79
  <!--
80
  if(window==top) {
81
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
82
  }
83
  //-->
84
</SCRIPT>
85
<NOSCRIPT>
86
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
87
</NOSCRIPT>
88
 
89
 
90
</FONT></TD>
91
</TR>
92
<TR>
93
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
94
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
95
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
96
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
97
</TR>
98
</TABLE>
99
<A NAME="skip-navbar_top"></A>
100
<!-- ========= END OF TOP NAVBAR ========= -->
101
 
102
<HR>
103
<!-- ======== START OF CLASS DATA ======== -->
104
<H2>
105
<FONT SIZE="-1">
106
com.badlogic.gdx</FONT>
107
<BR>
108
Class Net.HttpRequest</H2>
109
<PRE>
110
java.lang.Object
111
  <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.badlogic.gdx.Net.HttpRequest</B>
112
</PRE>
113
<DL>
114
<DT><B>Enclosing interface:</B><DD><A HREF="../../../com/badlogic/gdx/Net.html" title="interface in com.badlogic.gdx">Net</A></DD>
115
</DL>
116
<HR>
117
<DL>
118
<DT><PRE>public static class <B>Net.HttpRequest</B><DT>extends java.lang.Object</DL>
119
</PRE>
120
 
121
<P>
122
Contains getters and setters for the following parameters:
123
 <ul>
124
 <li><strong>httpMethod:</strong> GET or POST are most common, can use <A HREF="../../../com/badlogic/gdx/Net.HttpMethods.html" title="interface in com.badlogic.gdx"><CODE>HttpMethods</CODE></A> for static
125
 references</li>
126
 <li><strong>url:</strong> the url</li>
127
 <li><strong>headers:</strong> a map of the headers, setter can be called multiple times</li>
128
 <li><strong>timeout:</strong> time spent trying to connect before giving up</li>
129
 <li><strong>content:</strong> A string containing the data to be used when processing the HTTP request.</li>
130
 </ul>
131
 
132
 Abstracts the concept of a HTTP Request:
133
 
134
 <pre>
135
 Map<String, String> parameters = new HashMap<String, String>();
136
 parameters.put("user", "myuser");
137
 
138
 HttpRequest httpGet = new HttpRequest(HttpMethods.Get);
139
 httpGet.setUrl("http://somewhere.net");
140
 httpGet.setContent(HttpParametersUtils.convertHttpParameters(parameters));
141
 ...
142
 Gdx.net.sendHttpRequest (httpGet, new HttpResponseListener() {
143
        public void handleHttpResponse(HttpResponse httpResponse) {
144
                status = httpResponse.getResultAsString();
145
                //do stuff here based on response
146
        }
147
 
148
        public void failed(Throwable t) {
149
                status = "failed";
150
                //do stuff here based on the failed attempt
151
        }
152
 });
153
 </pre>
154
<P>
155
 
156
<P>
157
<HR>
158
 
159
<P>
160
 
161
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
162
 
163
<A NAME="constructor_summary"><!-- --></A>
164
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
165
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
166
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
167
<B>Constructor Summary</B></FONT></TH>
168
</TR>
169
<TR BGCOLOR="white" CLASS="TableRowColor">
170
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Net.HttpRequest.html#Net.HttpRequest(java.lang.String)">Net.HttpRequest</A></B>(java.lang.String&nbsp;httpMethod)</CODE>
171
 
172
<BR>
173
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new HTTP request with the specified HTTP method, see <A HREF="../../../com/badlogic/gdx/Net.HttpMethods.html" title="interface in com.badlogic.gdx"><CODE>Net.HttpMethods</CODE></A>.</TD>
174
</TR>
175
</TABLE>
176
&nbsp;
177
<!-- ========== METHOD SUMMARY =========== -->
178
 
179
<A NAME="method_summary"><!-- --></A>
180
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
181
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
182
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
183
<B>Method Summary</B></FONT></TH>
184
</TR>
185
<TR BGCOLOR="white" CLASS="TableRowColor">
186
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
187
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
188
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Net.HttpRequest.html#getContent()">getContent</A></B>()</CODE>
189
 
190
<BR>
191
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the content string to be used for the HTTP request.</TD>
192
</TR>
193
<TR BGCOLOR="white" CLASS="TableRowColor">
194
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
195
<CODE>&nbsp;long</CODE></FONT></TD>
196
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Net.HttpRequest.html#getContentLength()">getContentLength</A></B>()</CODE>
197
 
198
<BR>
199
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the content length in case content is a stream.</TD>
200
</TR>
201
<TR BGCOLOR="white" CLASS="TableRowColor">
202
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
203
<CODE>&nbsp;java.io.InputStream</CODE></FONT></TD>
204
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Net.HttpRequest.html#getContentStream()">getContentStream</A></B>()</CODE>
205
 
206
<BR>
207
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the content stream.</TD>
208
</TR>
209
<TR BGCOLOR="white" CLASS="TableRowColor">
210
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
211
<CODE>&nbsp;java.util.Map&lt;java.lang.String,java.lang.String&gt;</CODE></FONT></TD>
212
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Net.HttpRequest.html#getHeaders()">getHeaders</A></B>()</CODE>
213
 
214
<BR>
215
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a Map<String, String> with the headers of the HTTP request.</TD>
216
</TR>
217
<TR BGCOLOR="white" CLASS="TableRowColor">
218
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
219
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
220
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Net.HttpRequest.html#getMethod()">getMethod</A></B>()</CODE>
221
 
222
<BR>
223
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the HTTP method of the HttpRequest.</TD>
224
</TR>
225
<TR BGCOLOR="white" CLASS="TableRowColor">
226
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
227
<CODE>&nbsp;int</CODE></FONT></TD>
228
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Net.HttpRequest.html#getTimeOut()">getTimeOut</A></B>()</CODE>
229
 
230
<BR>
231
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the timeOut of the HTTP request.</TD>
232
</TR>
233
<TR BGCOLOR="white" CLASS="TableRowColor">
234
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
235
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
236
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Net.HttpRequest.html#getUrl()">getUrl</A></B>()</CODE>
237
 
238
<BR>
239
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the URL of the HTTP request.</TD>
240
</TR>
241
<TR BGCOLOR="white" CLASS="TableRowColor">
242
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
243
<CODE>&nbsp;void</CODE></FONT></TD>
244
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Net.HttpRequest.html#setContent(java.io.InputStream, long)">setContent</A></B>(java.io.InputStream&nbsp;contentStream,
245
           long&nbsp;contentLength)</CODE>
246
 
247
<BR>
248
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the content as a stream to be used for a POST for example, to transmit custom data.</TD>
249
</TR>
250
<TR BGCOLOR="white" CLASS="TableRowColor">
251
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
252
<CODE>&nbsp;void</CODE></FONT></TD>
253
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Net.HttpRequest.html#setContent(java.lang.String)">setContent</A></B>(java.lang.String&nbsp;content)</CODE>
254
 
255
<BR>
256
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the content to be used in the HTTP request.</TD>
257
</TR>
258
<TR BGCOLOR="white" CLASS="TableRowColor">
259
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
260
<CODE>&nbsp;void</CODE></FONT></TD>
261
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Net.HttpRequest.html#setHeader(java.lang.String, java.lang.String)">setHeader</A></B>(java.lang.String&nbsp;name,
262
          java.lang.String&nbsp;value)</CODE>
263
 
264
<BR>
265
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets a header to this HTTP request.</TD>
266
</TR>
267
<TR BGCOLOR="white" CLASS="TableRowColor">
268
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
269
<CODE>&nbsp;void</CODE></FONT></TD>
270
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Net.HttpRequest.html#setTimeOut(int)">setTimeOut</A></B>(int&nbsp;timeOut)</CODE>
271
 
272
<BR>
273
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the time to wait for the HTTP request to be processed, use 0 block until it is done.</TD>
274
</TR>
275
<TR BGCOLOR="white" CLASS="TableRowColor">
276
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
277
<CODE>&nbsp;void</CODE></FONT></TD>
278
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Net.HttpRequest.html#setUrl(java.lang.String)">setUrl</A></B>(java.lang.String&nbsp;url)</CODE>
279
 
280
<BR>
281
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the URL of the HTTP request.</TD>
282
</TR>
283
</TABLE>
284
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
285
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
286
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
287
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
288
</TR>
289
<TR BGCOLOR="white" CLASS="TableRowColor">
290
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
291
</TR>
292
</TABLE>
293
&nbsp;
294
<P>
295
 
296
<!-- ========= CONSTRUCTOR DETAIL ======== -->
297
 
298
<A NAME="constructor_detail"><!-- --></A>
299
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
300
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
301
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
302
<B>Constructor Detail</B></FONT></TH>
303
</TR>
304
</TABLE>
305
 
306
<A NAME="Net.HttpRequest(java.lang.String)"><!-- --></A><H3>
307
Net.HttpRequest</H3>
308
<PRE>
309
public <B>Net.HttpRequest</B>(java.lang.String&nbsp;httpMethod)</PRE>
310
<DL>
311
<DD>Creates a new HTTP request with the specified HTTP method, see <A HREF="../../../com/badlogic/gdx/Net.HttpMethods.html" title="interface in com.badlogic.gdx"><CODE>Net.HttpMethods</CODE></A>.
312
<P>
313
<DL>
314
<DT><B>Parameters:</B><DD><CODE>httpMethod</CODE> - This is the HTTP method for the request, see <A HREF="../../../com/badlogic/gdx/Net.HttpMethods.html" title="interface in com.badlogic.gdx"><CODE>Net.HttpMethods</CODE></A></DL>
315
</DL>
316
 
317
<!-- ============ METHOD DETAIL ========== -->
318
 
319
<A NAME="method_detail"><!-- --></A>
320
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
321
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
322
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
323
<B>Method Detail</B></FONT></TH>
324
</TR>
325
</TABLE>
326
 
327
<A NAME="setUrl(java.lang.String)"><!-- --></A><H3>
328
setUrl</H3>
329
<PRE>
330
public void <B>setUrl</B>(java.lang.String&nbsp;url)</PRE>
331
<DL>
332
<DD>Sets the URL of the HTTP request.
333
<P>
334
<DD><DL>
335
<DT><B>Parameters:</B><DD><CODE>url</CODE> - The URL to set.</DL>
336
</DD>
337
</DL>
338
<HR>
339
 
340
<A NAME="setHeader(java.lang.String, java.lang.String)"><!-- --></A><H3>
341
setHeader</H3>
342
<PRE>
343
public void <B>setHeader</B>(java.lang.String&nbsp;name,
344
                      java.lang.String&nbsp;value)</PRE>
345
<DL>
346
<DD>Sets a header to this HTTP request. Headers definition could be found at <a
347
 href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">HTTP/1.1: Header Field Definitions</a> document.
348
<P>
349
<DD><DL>
350
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the header.<DD><CODE>value</CODE> - the value of the header.</DL>
351
</DD>
352
</DL>
353
<HR>
354
 
355
<A NAME="setContent(java.lang.String)"><!-- --></A><H3>
356
setContent</H3>
357
<PRE>
358
public void <B>setContent</B>(java.lang.String&nbsp;content)</PRE>
359
<DL>
360
<DD>Sets the content to be used in the HTTP request.
361
<P>
362
<DD><DL>
363
<DT><B>Parameters:</B><DD><CODE>content</CODE> - A string encoded in the corresponding Content-Encoding set in the headers, with the data to send with the
364
           HTTP request. For example, in case of HTTP GET, the content is used as the query string of the GET while on a
365
           HTTP POST it is used to send the POST data.</DL>
366
</DD>
367
</DL>
368
<HR>
369
 
370
<A NAME="setContent(java.io.InputStream, long)"><!-- --></A><H3>
371
setContent</H3>
372
<PRE>
373
public void <B>setContent</B>(java.io.InputStream&nbsp;contentStream,
374
                       long&nbsp;contentLength)</PRE>
375
<DL>
376
<DD>Sets the content as a stream to be used for a POST for example, to transmit custom data.
377
<P>
378
<DD><DL>
379
<DT><B>Parameters:</B><DD><CODE>contentStream</CODE> - The stream with the content data.</DL>
380
</DD>
381
</DL>
382
<HR>
383
 
384
<A NAME="setTimeOut(int)"><!-- --></A><H3>
385
setTimeOut</H3>
386
<PRE>
387
public void <B>setTimeOut</B>(int&nbsp;timeOut)</PRE>
388
<DL>
389
<DD>Sets the time to wait for the HTTP request to be processed, use 0 block until it is done. The timeout is used for both
390
 the timeout when establishing TCP connection, and the timeout until the first byte of data is received.
391
<P>
392
<DD><DL>
393
<DT><B>Parameters:</B><DD><CODE>timeOut</CODE> - the number of milliseconds to wait before giving up, 0 or negative to block until the operation is done</DL>
394
</DD>
395
</DL>
396
<HR>
397
 
398
<A NAME="getTimeOut()"><!-- --></A><H3>
399
getTimeOut</H3>
400
<PRE>
401
public int <B>getTimeOut</B>()</PRE>
402
<DL>
403
<DD>Returns the timeOut of the HTTP request.
404
<P>
405
<DD><DL>
406
 
407
<DT><B>Returns:</B><DD>the timeOut.</DL>
408
</DD>
409
</DL>
410
<HR>
411
 
412
<A NAME="getMethod()"><!-- --></A><H3>
413
getMethod</H3>
414
<PRE>
415
public java.lang.String <B>getMethod</B>()</PRE>
416
<DL>
417
<DD>Returns the HTTP method of the HttpRequest.
418
<P>
419
<DD><DL>
420
</DL>
421
</DD>
422
</DL>
423
<HR>
424
 
425
<A NAME="getUrl()"><!-- --></A><H3>
426
getUrl</H3>
427
<PRE>
428
public java.lang.String <B>getUrl</B>()</PRE>
429
<DL>
430
<DD>Returns the URL of the HTTP request.
431
<P>
432
<DD><DL>
433
</DL>
434
</DD>
435
</DL>
436
<HR>
437
 
438
<A NAME="getContent()"><!-- --></A><H3>
439
getContent</H3>
440
<PRE>
441
public java.lang.String <B>getContent</B>()</PRE>
442
<DL>
443
<DD>Returns the content string to be used for the HTTP request.
444
<P>
445
<DD><DL>
446
</DL>
447
</DD>
448
</DL>
449
<HR>
450
 
451
<A NAME="getContentStream()"><!-- --></A><H3>
452
getContentStream</H3>
453
<PRE>
454
public java.io.InputStream <B>getContentStream</B>()</PRE>
455
<DL>
456
<DD>Returns the content stream.
457
<P>
458
<DD><DL>
459
</DL>
460
</DD>
461
</DL>
462
<HR>
463
 
464
<A NAME="getContentLength()"><!-- --></A><H3>
465
getContentLength</H3>
466
<PRE>
467
public long <B>getContentLength</B>()</PRE>
468
<DL>
469
<DD>Returns the content length in case content is a stream.
470
<P>
471
<DD><DL>
472
</DL>
473
</DD>
474
</DL>
475
<HR>
476
 
477
<A NAME="getHeaders()"><!-- --></A><H3>
478
getHeaders</H3>
479
<PRE>
480
public java.util.Map&lt;java.lang.String,java.lang.String&gt; <B>getHeaders</B>()</PRE>
481
<DL>
482
<DD>Returns a Map<String, String> with the headers of the HTTP request.
483
<P>
484
<DD><DL>
485
</DL>
486
</DD>
487
</DL>
488
<!-- ========= END OF CLASS DATA ========= -->
489
<HR>
490
 
491
 
492
<!-- ======= START OF BOTTOM NAVBAR ====== -->
493
<A NAME="navbar_bottom"><!-- --></A>
494
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
495
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
496
<TR>
497
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
498
<A NAME="navbar_bottom_firstrow"><!-- --></A>
499
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
500
  <TR ALIGN="center" VALIGN="top">
501
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
502
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
503
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
504
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Net.HttpRequest.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
505
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
506
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
507
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
508
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
509
  </TR>
510
</TABLE>
511
</TD>
512
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
513
libgdx API</EM>
514
</TD>
515
</TR>
516
 
517
<TR>
518
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
519
&nbsp;<A HREF="../../../com/badlogic/gdx/Net.HttpMethods.html" title="interface in com.badlogic.gdx"><B>PREV CLASS</B></A>&nbsp;
520
&nbsp;<A HREF="../../../com/badlogic/gdx/Net.HttpResponse.html" title="interface in com.badlogic.gdx"><B>NEXT CLASS</B></A></FONT></TD>
521
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
522
  <A HREF="../../../index.html?com/badlogic/gdx/Net.HttpRequest.html" target="_top"><B>FRAMES</B></A>  &nbsp;
523
&nbsp;<A HREF="Net.HttpRequest.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
524
&nbsp;<SCRIPT type="text/javascript">
525
  <!--
526
  if(window==top) {
527
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
528
  }
529
  //-->
530
</SCRIPT>
531
<NOSCRIPT>
532
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
533
</NOSCRIPT>
534
 
535
 
536
</FONT></TD>
537
</TR>
538
<TR>
539
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
540
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
541
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
542
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
543
</TR>
544
</TABLE>
545
<A NAME="skip-navbar_bottom"></A>
546
<!-- ======== END OF BOTTOM NAVBAR ======= -->
547
 
548
<HR>
549
 
550
                                <div style="font-size:9pt"><i>
551
                                Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
552
                                </i></div>
553
 
554
</BODY>
555
</HTML>