Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Methods of SimpleHttp are after change now too much protected #30302

@dasniko

Description

@dasniko

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

core

Describe the bug

With #27656 the do...() methods of SimpleHttp were refactored by @ahus1 . I generally welcome this change, but...

The do..() methods with the KeycloakSession as second parameter are still public, the ones with the HttpClient are now protected.
And there are no public doPut(), doPatch(), and doHead() methods with arguments (String url, KeycloakSession session). Before the change, we could use the methods with the HttpClient for these methods. Now this is no more possible when using SimpleHttp as a good and simple http client inside of Keycloak extensions.
The use of SimpleHttp is the only easy, simple method to use a http client, as Keycloak doesn't provide other easy possibilities. Or does is meanwhile?

Version

25.0.0

Regression

  • The issue is a regression

Expected behavior

Provide public static SimpleHttp.do...() methods for all http methods by default.

Actual behavior

Only a few http methods are reflected by the public SimpleHttp.do...() methods.

How to Reproduce?

Try to use the SimpleHttp class in a custom extension and try to use the SimpleHttp.doPut(...) method.

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions