Make usage of http clients (apache, OkHttp, Jetty, Asynch) easier
@ManishS6 já está trabalhando nisso.
Desde 4/10/2024.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 25/100
Direção de pesquisa
Comece lendo Cloudinary.loadStrategies(), Cloudinary.class e Configuration.class para entender o carregamento atual de estratégias e a configuração baseada em Map. Revise como as estratégias Apache, OkHttp, Jetty e Asynch são selecionadas e como a configuração chega ao construtor. Done deve fornecer uma forma definida e documentada para que os consumidores selecionem clientes HTTP e os configurem sem um Map opaco.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Feature request for Cloudinary Java SDK
General idea: making the settings of http client library to be used easier for consumers of the SDK,
by enabling configuration via new Cloudinary(...) constructor.
Explain your use case
I want to use plain java http client, instead of Apache one.
Describe the problem you’re trying to solve
In Cloudinary.loadStrategies() there's a fixed list of strings with classnames, which a consumer of the SDK can't change.
This means even if I provide my own strategy, this will not loaded and I still being forced to add dependency for apache http.
(hint: technically: when the class om.cloudinary.http5.ApiStrategy is not found, an UnknownError is thrown, which is bad)
Also this brings me to another point: the constructor of Cloudinary should better accept Configuration object, instead of Map config. It's very annoying for me as an SDK user, to provide a Map with configs.
I get no auto-completion on Maps and must find details in either source code or documentation (which is just cumbersome).
So I don't know immediately what config options are available, that I could e.g. provide HTTP proxy address.
(Sorry, if I mix two problems here ... I came to these two, when I thought about a solution proposal, below)
Do you have a proposed solution?
YES.
The constructor of Cloudinary.class (or better the Configuration.class) could have some new field apiStrategy of type class<AbstractApiStrategy>. And another one for the UploadStrategy.
Then, the loadStragies() method will not load by name (which can contain typos), but rather by class(type) directly.
On the second problem, adding a new (overloaded) constructor to Cloudinary is easy to add, but that's not sufficient.
Ideally, the Configuration class will provide a convenient Builder function, so users of the SDK are better guided,
and plausibility checks can easier be implemented.
I'm happy to provide a PR, if this resonates with you.
- Linguagem predominante
- Java
- Estrelas
- 176
- Forks
- 113
- Merge médio
- 9d 20h
- PRs com merge (30d)
- 2
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Sem guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de cloudinary/cloudinary_java
-
`options` map modified directlyTalvez livre de novo @adimiz1 assumiu há 481 dias e não há nenhum pull request aberto. Aberta
cloudinary/cloudinary_java#383 · 3 comentários · 1 reação · 1 responsável ·
-
Api#resourceByAssetID does not support same options as in documentationTalvez livre de novo @adimiz1 assumiu há 646 dias e não há nenhum pull request aberto. Aberta
cloudinary/cloudinary_java#357 · 2 comentários · 1 responsável ·
-
Readme - Maven dependencyTalvez livre de novo @adimiz1 assumiu há 754 dias e não há nenhum pull request aberto. Aberta
cloudinary/cloudinary_java#349 · 1 comentário · 1 responsável ·
-
cloudinary-http5 ignores system propertiesTalvez livre de novo @adimiz1 assumiu há 754 dias e não há nenhum pull request aberto. Aberta
cloudinary/cloudinary_java#348 · 2 comentários · 1 responsável ·
-
Missing contributing guidelinesTalvez livre de novo @debnath003 assumiu há 768 dias e não há nenhum pull request aberto. Aberta
cloudinary/cloudinary_java#339 · 2 comentários · 1 responsável ·
Todas as issues de cloudinary/cloudinary_java
Issues semelhantes
-
bug(core): skip_nodes.json is missing SELECT and PRE, causing Python and Java to insert separators into dropdown options and preformatted textTalvez já em andamento @Bhumit267 assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 1 dia
-
ExceptionThrowShouldUseContext: NullPointerException on a catch block inside an annotation typeTalvez já em andamento @Carbon14-48 assumiu hoje. Abertaapproved
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
checkstyle/checkstyle#22784 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
ASSERT-KTH/depclean#591 ·
Mantenedores costumam responder em até 1 dia
-
Api537FlareFlameModel.setStackHeightM accepts a negative heightTalvez já em andamento @EvenSol assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
Mantenedores costumam responder em até 1 dia