Skip to content

How can get response HTTP status code from API Gateway generated SDK #981

Open
@agalfioni

Description

@agalfioni

State your question
I need to obtain HTTP status code when make an API request using generated SDK for Android.

Which AWS Services are you utilizing?
Using AWSAPIGateway.

Provide code snippets (if applicable)

ApiClientFactory factory = new ApiClientFactory()
                .credentialsProvider(credential);

// Create an instance from SDK generated by API Gateway.
GeneratedClientName clientAPI = factory.build(GeneratedClientName.class);

Result result = null;
try{
    result = clientAPI.exampleEndpointPost(logsModel);
    // How to obtain HTTP status code ???
}catch (Exception e){
    e.printStackTrace();
}

(In that endpoint, the Method Response have a HTTP 200 and 500 status code with Result like Response Body Model)

Environment(please complete the following information):
com.amazonaws:aws-android-sdk-core:2.13.4
com.amazonaws:aws-android-sdk-apigateway-core:2.13.4

Device Information (please complete the following information):
All devices and android versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api gatewayIssues with the AWS Android API Gateway SDKfeature-requestRequest a new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions