@@ -29,9 +29,9 @@ public static void main(String[] args) throws IOException {
2929 request .addQueryParam ("offset" , "0" );
3030 try {
3131 response = client .api (request );
32- System .out .println (response .statusCode );
33- System .out .println (response .body );
34- System .out .println (response .headers );
32+ System .out .println (response .getStatusCode () );
33+ System .out .println (response .getBody () );
34+ System .out .println (response .getHeaders () );
3535 } catch (IOException ex ) {
3636 throw ex ;
3737 }
@@ -44,16 +44,16 @@ public static void main(String[] args) throws IOException {
4444
4545 try {
4646 response = client .api (request );
47- System .out .println (response .statusCode );
48- System .out .println (response .body );
49- System .out .println (response .headers );
47+ System .out .println (response .getStatusCode () );
48+ System .out .println (response .getBody () );
49+ System .out .println (response .getHeaders () );
5050 } catch (IOException ex ) {
5151 throw ex ;
5252 }
5353 String apiKeyId = "" ;
5454 try {
5555 ObjectMapper mapper = new ObjectMapper ();
56- JsonNode json = mapper .readTree (response .body );
56+ JsonNode json = mapper .readTree (response .getBody () );
5757 apiKeyId = json .path ("api_key_id" ).asText ();
5858 } catch (IOException ex ) {
5959 throw ex ;
@@ -65,9 +65,9 @@ public static void main(String[] args) throws IOException {
6565 request .setEndpoint ("/v3/api_keys/" + apiKeyId );
6666 try {
6767 response = client .api (request );
68- System .out .println (response .statusCode );
69- System .out .println (response .body );
70- System .out .println (response .headers );
68+ System .out .println (response .getStatusCode () );
69+ System .out .println (response .getBody () );
70+ System .out .println (response .getHeaders () );
7171 } catch (IOException ex ) {
7272 throw ex ;
7373 }
@@ -77,9 +77,9 @@ public static void main(String[] args) throws IOException {
7777 request .setBody ("{\" name\" : \" A New Ho}" );
7878 try {
7979 response = client .api (request );
80- System .out .println (response .statusCode );
81- System .out .println (response .body );
82- System .out .println (response .headers );
80+ System .out .println (response .getStatusCode () );
81+ System .out .println (response .getBody () );
82+ System .out .println (response .getHeaders () );
8383 } catch (IOException ex ) {
8484 throw ex ;
8585 }
@@ -90,9 +90,9 @@ public static void main(String[] args) throws IOException {
9090 request .setBody ("{\" name\" : \" A New Hope\" ,\" scopes\" : [\" user.profile.read\" ,\" user.profile.update\" ]}" );
9191 try {
9292 response = client .api (request );
93- System .out .println (response .statusCode );
94- System .out .println (response .body );
95- System .out .println (response .headers );
93+ System .out .println (response .getStatusCode () );
94+ System .out .println (response .getBody () );
95+ System .out .println (response .getHeaders () );
9696 } catch (IOException ex ) {
9797 throw ex ;
9898 }
@@ -102,8 +102,8 @@ public static void main(String[] args) throws IOException {
102102 request .setMethod (Method .DELETE );
103103 try {
104104 response = client .api (request );
105- System .out .println (response .statusCode );
106- System .out .println (response .headers );
105+ System .out .println (response .getStatusCode () );
106+ System .out .println (response .getHeaders () );
107107 } catch (IOException ex ) {
108108 throw ex ;
109109 }
0 commit comments