oracle / oci-dotnet-sdk

Oracle Cloud Infrastructure SDK for .NET
https://cloud.oracle.com/cloud-infrastructure
Other
53 stars 20 forks source link

httpResponseMessage in Responses in version 85.1.0 #230

Closed nghianguyen09 closed 4 months ago

nghianguyen09 commented 4 months ago

I have been using the Oci.DotnetSDK version 78.2.0, and there was no ‘httpResponseMessage’ in the responses (for example, CancelProcessorJobResponse). However, after updating the SDK to version 85.1.0, I noticed an additional property named ‘httpResponseMessage’ in the response. This property is not currently useful to me.

Is there an option to hide or remove this property from the response?

github-anurag commented 4 months ago

@nghianguyen09 Can you elaborate more on how this property is causing an issue for you? We added this property in case the users want to get use the original response from the service.

nghianguyen09 commented 4 months ago

@github-anurag Thank you for your prompt response. I appreciate the addition of the ‘httpResponseMessage’ property as it provides valuable information for logging and debugging purposes. This could indeed be beneficial for me in the future.

However, in my current scenario, it’s more of an inconvenience than a problem. I am developing an API hub or SaaS, where my customers interact with the OCI API through my API. In my API responses, I simply relay what the OCI API returns to me. This approach simplifies the process of upgrading to new versions of the OCI SDK, as I don’t need to modify my response each time the OCI SDK changes, especially in terms of Response models.

Including the ‘httpResponseMessage’ in the response doesn’t cause any issues at the moment, but it is redundant and unnecessary for my customers. The goal of my API is to simplify the use of the OCI API as much as possible. I also noticed some authentication headers in the ‘httpResponseMessage’, but I’m unsure if they are relevant to my users since I use my OCI service account to interact with the OCI API on their behalf.

I believe I can manage this at my end for now. You can consider this issue closed. Thank you for your support and understanding.