Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Side by Side Diff: webrtc/examples/androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java

Issue 1883923003: Use the new appr.tc URL (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/examples/androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 package org.appspot.apprtc.util; 11 package org.appspot.apprtc.util;
12 12
13 import java.io.IOException; 13 import java.io.IOException;
14 import java.io.InputStream; 14 import java.io.InputStream;
15 import java.io.OutputStream; 15 import java.io.OutputStream;
16 import java.net.HttpURLConnection; 16 import java.net.HttpURLConnection;
17 import java.net.SocketTimeoutException; 17 import java.net.SocketTimeoutException;
18 import java.net.URL; 18 import java.net.URL;
19 import java.util.Scanner; 19 import java.util.Scanner;
20 20
21 /** 21 /**
22 * Asynchronous http requests implementation. 22 * Asynchronous http requests implementation.
23 */ 23 */
24 public class AsyncHttpURLConnection { 24 public class AsyncHttpURLConnection {
25 private static final int HTTP_TIMEOUT_MS = 8000; 25 private static final int HTTP_TIMEOUT_MS = 8000;
26 private static final String HTTP_ORIGIN = "https://apprtc.appspot.com"; 26 private static final String HTTP_ORIGIN = "https://appr.tc";
27 private final String method; 27 private final String method;
28 private final String url; 28 private final String url;
29 private final String message; 29 private final String message;
30 private final AsyncHttpEvents events; 30 private final AsyncHttpEvents events;
31 private String contentType; 31 private String contentType;
32 32
33 /** 33 /**
34 * Http requests callbacks. 34 * Http requests callbacks.
35 */ 35 */
36 public interface AsyncHttpEvents { 36 public interface AsyncHttpEvents {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 + e.getMessage()); 113 + e.getMessage());
114 } 114 }
115 } 115 }
116 116
117 // Return the contents of an InputStream as a String. 117 // Return the contents of an InputStream as a String.
118 private static String drainStream(InputStream in) { 118 private static String drainStream(InputStream in) {
119 Scanner s = new Scanner(in).useDelimiter("\\A"); 119 Scanner s = new Scanner(in).useDelimiter("\\A");
120 return s.hasNext() ? s.next() : ""; 120 return s.hasNext() ? s.next() : "";
121 } 121 }
122 } 122 }
OLDNEW
« no previous file with comments | « webrtc/examples/androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698