-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SES list-contacts action not working with kotlin library #758
Comments
Hi @peterehik-px, thanks for the bug report. I've reproduced this on my end. We'll research solutions internally for resolving this when using OkHttp but, in the meantime, you can workaround the issue by selecting the CRT client engine instead of OkHttp. Add the following dependency to your build.gradle.kts file: implementation("aws.smithy.kotlin:http-client-engine-crt:0.12.13") And then specify the val sesClient = SesV2Client.fromEnvironment {
httpClientEngine = CrtHttpEngine { }
} |
A review of other services indicates that GETs with bodies are present in the following APIs:
|
We had a conversation with the OkHttp maintainers and they aren't inclined to support GET requests with bodies at this time. We'll work with service teams (e.g., SESv2, EFS, Lightsail, etc.) to get new endpoints/models where possible so that those API calls which require bodies no longer use GET. These updates may take a while so the short-term fix remains to use the CRT HTTP engine when needed. |
|
Describe the bug
listContactsPaginated request uses okhttpclient to call out to ses endpoint with a GET request. However it passes a request body which is not allowed by okhttp clients. Here's an open issue from okhttp.
Expected behavior
I expect that when I call this endpoint, I get the result of the amazon ses ListContact action
Current behavior
This is the error that gets thrown.
Steps to Reproduce
Possible Solution
The problem is in this class, notice where it creates a request body:
so it either needs to use a post request but that means making an update to the ses v2 api, which shouldn't be a problem or somehow pass in the request as url parameters or let's just not use okhttp. The java version of this method also has an outstanding issue that still persists in the latest version
Context
No response
AWS Kotlin SDK version used
0.17.12-beta
Platform (JVM/JS/Native)
openjdk 17.0.4
Operating System and version
osx
The text was updated successfully, but these errors were encountered: