@@ -33,9 +33,9 @@ public static void main(String[] args) throws IOException {
3333 request .queryParams = queryParams ;
3434 try {
3535 response = client .api (request );
36- System .out .println (response .statusCode );
37- System .out .println (response .body );
38- System .out .println (response .headers );
36+ System .out .println (response .getStatusCode () );
37+ System .out .println (response .getBody () );
38+ System .out .println (response .getHeaders () );
3939 } catch (IOException ex ) {
4040 throw ex ;
4141 }
@@ -48,16 +48,16 @@ public static void main(String[] args) throws IOException {
4848 "{\" name\" : \" My api Key\" ,\" scopes\" : [\" mail.send\" ,\" alerts.create\" ,\" alerts.read\" ]}" ;
4949 try {
5050 response = client .api (request );
51- System .out .println (response .statusCode );
52- System .out .println (response .body );
53- System .out .println (response .headers );
51+ System .out .println (response .getStatusCode () );
52+ System .out .println (response .getBody () );
53+ System .out .println (response .getHeaders () );
5454 } catch (IOException ex ) {
5555 throw ex ;
5656 }
5757 String apiKeyId = "" ;
5858 try {
5959 ObjectMapper mapper = new ObjectMapper ();
60- JsonNode json = mapper .readTree (response .body );
60+ JsonNode json = mapper .readTree (response .getBody () );
6161 apiKeyId = json .path ("api_key_id" ).asText ();
6262 } catch (IOException ex ) {
6363 throw ex ;
@@ -69,9 +69,9 @@ public static void main(String[] args) throws IOException {
6969 request .endpoint = "/v3/api_keys/" + apiKeyId ;
7070 try {
7171 response = client .api (request );
72- System .out .println (response .statusCode );
73- System .out .println (response .body );
74- System .out .println (response .headers );
72+ System .out .println (response .getStatusCode () );
73+ System .out .println (response .getBody () );
74+ System .out .println (response .getHeaders () );
7575 } catch (IOException ex ) {
7676 throw ex ;
7777 }
@@ -81,9 +81,9 @@ public static void main(String[] args) throws IOException {
8181 request .body = "{\" name\" : \" A New Hope\" }" ;
8282 try {
8383 response = client .api (request );
84- System .out .println (response .statusCode );
85- System .out .println (response .body );
86- System .out .println (response .headers );
84+ System .out .println (response .getStatusCode () );
85+ System .out .println (response .getBody () );
86+ System .out .println (response .getHeaders () );
8787 } catch (IOException ex ) {
8888 throw ex ;
8989 }
@@ -95,9 +95,9 @@ public static void main(String[] args) throws IOException {
9595 "{\" name\" : \" A New Hope\" ,\" scopes\" : [\" user.profile.read\" ,\" user.profile.update\" ]}" ;
9696 try {
9797 response = client .api (request );
98- System .out .println (response .statusCode );
99- System .out .println (response .body );
100- System .out .println (response .headers );
98+ System .out .println (response .getStatusCode () );
99+ System .out .println (response .getBody () );
100+ System .out .println (response .getHeaders () );
101101 } catch (IOException ex ) {
102102 throw ex ;
103103 }
@@ -107,8 +107,8 @@ public static void main(String[] args) throws IOException {
107107 request .method = Method .DELETE ;
108108 try {
109109 response = client .api (request );
110- System .out .println (response .statusCode );
111- System .out .println (response .headers );
110+ System .out .println (response .getStatusCode () );
111+ System .out .println (response .getHeaders () );
112112 } catch (IOException ex ) {
113113 throw ex ;
114114 }
0 commit comments