I'm using this AWS Object ApiRequest.
I've a url endpoint: url = "https://...com/songs"
NOT WORKING REQUEST(response 500):
ApiRequest request1 = new ApiRequest().withPath(url + "?userId=s123")
.withHttpMethod(HttpMethodName.GET);
WORKING REQUEST(response 200):
Map<String, String> mapParams = new HashMap<>();
mapParams.put("userId", "s123");
ApiRequest request1 = new ApiRequest().withPath(url)
.withHttpMethod(HttpMethodName.GET)
.withParameters(mapParams);
This is the ApiRequest object documentation:
https://docs.aws.amazon.com/AWSAndroidSDK/latest/javadoc/index.html?com/amazonaws/mobileconnectors/apigateway/ApiRequest.html
Why doesn't it work when using the userId in the query string(url) vs as a parameter? What is the difference between withParameters to query string?