@@ -38,13 +38,15 @@ public class Request {
3838 private final List <NameValuePair > postParams ;
3939 private final boolean requiresAuthentication ;
4040 private final String authString ;
41+ private final String postJson ;
4142
4243 private Request (RequestBuilder builder ) {
4344 this .method = builder .method ;
4445 this .url = builder .url ;
4546 this .requiresAuthentication = builder .requiresAuthentication ;
4647 this .authString = builder .authString ;
4748 this .postParams = builder .postParams ;
49+ this .postJson = builder .postJson ;
4850 }
4951
5052
@@ -68,6 +70,10 @@ public String getAuthString() {
6870 public List <NameValuePair > getPostParams () {
6971 return postParams ;
7072 }
73+
74+ public String getPostJson () {
75+ return postJson ;
76+ }
7177
7278
7379 /**
@@ -97,6 +103,7 @@ public static class RequestBuilder {
97103 private List <NameValuePair > postParams ;
98104 private boolean requiresAuthentication ;
99105 private String authString ;
106+ private String postJson ;
100107
101108 public RequestBuilder (MethodType method , String url ) {
102109 this .method = method ;
@@ -117,6 +124,11 @@ public RequestBuilder authString(String authString) {
117124 this .authString = authString ;
118125 return this ;
119126 }
127+
128+ public RequestBuilder postJson (String postJson ) {
129+ this .postJson = postJson ;
130+ return this ;
131+ }
120132
121133 public Request build () {
122134 return new Request (this );
0 commit comments