@@ -46,7 +46,7 @@ protected void setUp() throws Exception {
4646
4747 @ SmallTest
4848 public void testPost1 () throws Throwable {
49- httpManager .asyncPost ("http://www.baidu.com" ,
49+ httpManager .asyncPost (null , "http://www.baidu.com" ,
5050 "hello" .getBytes (), null , UpToken .parse (TestConfig .token_z0 ), "hello" .getBytes ().length ,
5151 null , new CompletionHandler () {
5252 @ Override
@@ -69,7 +69,7 @@ public void complete(ResponseInfo rinfo, JSONObject response) {
6969 @ SmallTest
7070 public void testPost2 () throws Throwable {
7171
72- httpManager .asyncPost ("http://up.qiniu.com" , "hello" .getBytes (), null ,
72+ httpManager .asyncPost (null , "http://up.qiniu.com" , "hello" .getBytes (), null ,
7373 UpToken .parse (TestConfig .token_z0 ), "hello" .getBytes ().length ,
7474 null , new CompletionHandler () {
7575 @ Override
@@ -92,7 +92,7 @@ public void complete(ResponseInfo rinfo, JSONObject response) {
9292 public void testPost3 () throws Throwable {
9393 runTestOnUiThread (new Runnable () { // THIS IS THE KEY TO SUCCESS
9494 public void run () {
95- httpManager .asyncPost ("http://httpbin.org/status/500" , "hello" .getBytes (),
95+ httpManager .asyncPost (null , "http://httpbin.org/status/500" , "hello" .getBytes (),
9696 null , UpToken .parse (TestConfig .token_z0 ), "hello" .getBytes ().length ,
9797 null , new CompletionHandler () {
9898 @ Override
@@ -118,7 +118,7 @@ public void complete(ResponseInfo rinfo, JSONObject response) {
118118 public void testPost4 () throws Throwable {
119119 runTestOnUiThread (new Runnable () { // THIS IS THE KEY TO SUCCESS
120120 public void run () {
121- httpManager .asyncPost ("http://httpbin.org/status/418" ,
121+ httpManager .asyncPost (null , "http://httpbin.org/status/418" ,
122122 "hello" .getBytes (),
123123 null , UpToken .parse (TestConfig .token_z0 ), "hello" .getBytes ().length ,
124124 null , new CompletionHandler () {
@@ -144,7 +144,7 @@ public void complete(ResponseInfo rinfo, JSONObject response) {
144144 @ SmallTest
145145 public void testPostNoDomain () throws Throwable {
146146
147- httpManager .asyncPost ("http://no-domain.qiniu.com" , "hello" .getBytes (),
147+ httpManager .asyncPost (null , "http://no-domain.qiniu.com" , "hello" .getBytes (),
148148 null , UpToken .parse (TestConfig .token_z0 ), "hello" .getBytes ().length ,
149149 null , new CompletionHandler () {
150150 @ Override
@@ -190,7 +190,7 @@ public void complete(ResponseInfo rinfo, JSONObject response) {
190190 @ SmallTest
191191 public void testPostIP () throws Throwable {
192192 StringMap x = new StringMap ().put ("Host" , "up.qiniu.com" );
193- httpManager .asyncPost ("http://183.131.7.18" , "hello" .getBytes (),
193+ httpManager .asyncPost (null , "http://183.131.7.18" , "hello" .getBytes (),
194194 x , UpToken .parse (TestConfig .token_z0 ), "hello" .getBytes ().length ,
195195 null , new CompletionHandler () {
196196 @ Override
@@ -215,7 +215,7 @@ public void testProxy() throws Throwable {
215215 StringMap x = new StringMap ();
216216 ProxyConfiguration p = new ProxyConfiguration ("115.238.101.32" , 80 );
217217 Client c = new Client (p , 10 , 30 , null , null );
218- c .asyncPost ("http://upproxy1.qiniu.com" , "hello" .getBytes (),
218+ c .asyncPost (null , "http://upproxy1.qiniu.com" , "hello" .getBytes (),
219219 x , UpToken .parse (TestConfig .token_z0 ), "hello" .getBytes ().length ,
220220 null , new CompletionHandler () {
221221 @ Override
0 commit comments