[go: nahoru, domu]

Skip to content
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

chore: demo of classic API of Apache Core+Client 5.x #1960

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

diegomarquezp
Copy link
Contributor
@diegomarquezp diegomarquezp commented Jun 27, 2024

Output of Main class:

SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Jun 27, 2024 3:33:11 AM com.google.auth.oauth2.DefaultCredentialsProvider warnAboutProblematicCredentials
WARNING: You are authenticating using user credentials. For production, we recommend using service account credentials.

To learn more about service account credentials, see http://cloud.google.com/docs/authentication/external/set-up-adc-on-cloud
Project display name: [REDACTED]

Process finished with exit code 0

Caveats

  • We cannot set SocketTimeout when inside ApacheHttpRequest, so I used an indirect way of setting a read timeout via RequestTimeout. This is because we cannot set low and high level configurations in the HttpUriRequest
  • I did not dig deeper, but only CloseableHttpClient could produce a CloseableHttpResponse with the needed data such as status code, content encoding, etc. This made me modify the interface of ApacheHttpTransport to only accept CloseableHttpClients

@product-auto-label product-auto-label bot added the size: xl Pull request size is extra large. label Jun 27, 2024
@diegomarquezp diegomarquezp added do not merge Indicates a pull request not ready for merge, due to either quality or timing. and removed size: xl Pull request size is extra large. labels Jun 27, 2024
*
* @param httpClient Closeable Apache HTTP client to use
*/
public ApacheHttpTransport(CloseableHttpClient httpClient) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The focus of the POC is to get the feedback about this argument.

@product-auto-label product-auto-label bot added the size: xl Pull request size is extra large. label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Indicates a pull request not ready for merge, due to either quality or timing. size: xl Pull request size is extra large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants