Skip to content

Merge IODataResponseMessageAsync into IODataResponseMessage #3460

@gathogojr

Description

@gathogojr

Is your feature request related to a problem? Please describe.

Merge the IODataResponseMessageAsync interface into the IODataResponseMessage interface to simplify the API surface and remove historical technical debt introduced to maintain backward compatibility.

The IODataResponseMessageAsync interface was introduced as a separate interface to add asynchronous stream operations without breaking existing implementations of IODataResponseMessage.

Describe the solution you'd like

Currently:

  • IODataResponseMessage provides synchronous GetStream() method
  • IODataResponseMessageAsync extends IODataResponseMessage and adds GetStreamAsync() method

Proposed changes

Merge IODataResponseMessageAsync into IODataResponseMessage:

public interface IODataResponseMessage
{
    IEnumerable<KeyValuePair<string, string>> Headers { get; }
    
    int StatusCode { get; set; }
    
    string GetHeader(string headerName);
    
    void SetHeader(string headerName, string headerValue);
    
    Stream GetStream();
    
    Task<Stream> GetStreamAsync(); // Add this method
}

Additional context

  • Major breaking change: Any custom implementations of IODataResponseMessage will need to implement GetStreamAsync()
  • Classes currently implementing only IODataResponseMessage (not IODataResponseMessageAsync) will have compilation errors
  • This is acceptable for a major version release (e.g., 9.x)

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