aws-amplify / aws-sdk-android

AWS SDK for Android. For more information, see our web site:
https://docs.amplify.aws
Other
1.02k stars 548 forks source link

Need for HTTP OPTIONS Method in Core Runtime #644

Open KateLeeCandy opened 5 years ago

KateLeeCandy commented 5 years ago

AWS Web Services has 'OPTIONS', we hope AWS Android SDK correspond it

AWS Java SDK v1.11.482 https://github.com/aws/aws-sdk-java/blob/master/aws-java-sdk-core/src/main/java/com/amazonaws/http/HttpMethodName.java AWS Android SDK v2.10.1 https://github.com/aws-amplify/aws-sdk-android/blob/master/aws-android-sdk-core/src/main/java/com/amazonaws/http/HttpMethodName.java

mutablealligator commented 5 years ago

@KateLeeCandy Thank you for pointing this out. I will discuss this with the team and have an update soon. Can you describe your use case regarding using OPTIONS?

KateLeeCandy commented 5 years ago

We design the federated service: Get: return the federated list of user. Post: federate object to user. Options: return the federated relationship between this object and user, to determine which step client should go. Delete: remove the federated relationship between this object and user

mutablealligator commented 5 years ago

Thank you @KateLeeCandy for the response. Can you post a code snippet of how you would like to use OPTIONS if it exists? I will have an update once I discuss the use-case with the team.

KateLeeCandy commented 5 years ago
private void setHttpMethod(@NonNull DefaultRequest awsRequest, @NonNull String method) {
        HttpMethodName methodName = HttpMethodName.valueOf(method);
        awsRequest.setHttpMethod(methodName);
}
mutablealligator commented 5 years ago

@KateLeeCandy Thank you for pasting a code snippet. I will add this item to our backlog for prioritization.