Skip to content

Status code in PutObjectResponse is internal, unlike AWS S3's implementation #1176

Description

@minhaz109074

Description:

In the MinIO .NET SDK, I encountered an issue where the HttpStatusCode in the PutObjectResponse is internal, making it inaccessible after receiving a response. However, in AWS S3's SDK, the same property is public, which allows developers to easily access the status code of the operation.

Code:

Here’s an example of how the MinIO SDK currently handles the HttpStatusCode:

public class GenericResponse
{
    internal GenericResponse(HttpStatusCode statusCode, string responseContent)
    {
        ResponseContent = responseContent;
        ResponseStatusCode = statusCode;
    }

    internal string ResponseContent { get; }
    internal HttpStatusCode ResponseStatusCode { get; }
}

public class PutObjectResponse : GenericResponse
{
}

Suggestion:

Please consider changing the visibility of ResponseStatusCode from internal to public to align with the behavior of AWS S3's SDK and
improve usability.

Environment:

  • MinIO .NET SDK version: 6.0.3.0
  • .NET version: 8.0
  • Operating system: Windows

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions