Skip to content

Commit ab8f655

Browse files
committed
Ignore null request parameters
When building requests, skip parameters which value is null. This avoid having a number of parameters that contains the String "null". That was particularly annoying with header parameters.
1 parent e38196a commit ab8f655

File tree

1 file changed

+4
-0
lines changed
  • aws-android-sdk-apigateway-core/src/main/java/com/amazonaws/mobileconnectors/apigateway

1 file changed

+4
-0
lines changed

aws-android-sdk-apigateway-core/src/main/java/com/amazonaws/mobileconnectors/apigateway/ApiClientHandler.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,10 @@ Request<?> buildRequest(Method method, Object[] args) {
187187
void processParameter(Request<?> request, Parameter p, Object arg) {
188188
final String name = p.name();
189189
final String location = p.location();
190+
191+
if (arg == null) {
192+
return;
193+
}
190194

191195
if ("header".equals(location)) {
192196
request.addHeader(name, String.valueOf(arg));

0 commit comments

Comments
 (0)