<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D51Y00008W3DsDSAVOkta Classic EngineAdministrationAnswered2024-03-15T12:42:17.000Z2020-05-18T16:03:29.000Z2020-05-26T13:27:47.000Z

VenkatD.24097 (Customer) asked a question.

Okta Java SDK - How to get response headers

We have a potential use case to read the original response headers returned by the Okta REST call but I do not find a way to access that information when I use Okta SDK API.

 

For example, I am writing a client code to create a new User on Okta side, the client returns the "com.okta.sdk.resource.user.User" object when the request is successful. As expected the User object doesn't have any of the response header information like "X-Rate-Limit-Remaining" and my question is how can I get these headers when I use SDK?

 

Looks we get this information whenever Okta throws exception but not for the success requests.

 

Thanks


  • Hi Venkat

     

    The SDK acts as a wrapper on the API calls, and because of this that information is not directly exposed, as you've possibly seen or noticed following the relevant SDK documentation for the used functions.

    The failures contain them more verbose, success conditions automatically strip the response, and this is simply by design in most SDKs. This is a feature gap from this perspective, and I would highly recommend that you open an Issue under the GitHub repository for the SDK to raise awareness for this particular requirement.

     

    A possible solution in this case is to use the API calls directly, to have full control, versus using the SDK.

    Expand Post
    • VenkatD.24097 (Customer)

      Thank you Florin for your response and will use one of the workaround.


      Venkat Danda
This question is closed.
Loading
Okta Java SDK - How to get response headers