File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/AndroidClient/client/src/androidTest/java/net/servicestack/client/tests Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 1919
2020import net .servicestack .client .tests .testdtos .*;
2121
22+ import java .io .UnsupportedEncodingException ;
2223import java .math .BigDecimal ;
2324import java .math .BigInteger ;
2425import java .net .HttpURLConnection ;
26+ import java .net .URLEncoder ;
2527import java .util .ArrayList ;
2628import java .util .Date ;
2729import java .util .HashMap ;
@@ -250,6 +252,17 @@ public void exec(HttpURLConnection conn) {
250252 client .put (new HelloReturnVoid ().setId (2 ));
251253 assertEquals (HttpMethods .Put , sentMethods .get (sentMethods .size () - 1 ));
252254 }
255+
256+ public void test_Can_get_response_as_Raw_String (){
257+ String response = client .get (new HelloString ().setName ("World" ));
258+ assertEquals ("World" , response );
259+ }
260+
261+ public void test_Can_get_response_as_Raw_Bytes () {
262+ byte [] response = client .get ("/json/reply/HelloString?Name=World" , byte [].class );
263+ assertEquals ("World" , Utils .fromUtf8Bytes (response ));
264+ }
265+
253266 /* TEST HELPERS */
254267
255268 public static HelloAllTypes createHelloAllTypes (){
You can’t perform that action at this time.
0 commit comments