
VenkatD.24097 (Customer) asked a question.
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.
Venkat Danda