Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Search .NET Client API supporting gzip compression on response streams #3724

Closed
nothingmn opened this issue Sep 21, 2017 · 2 comments
Closed
Assignees
Labels
Search Service Attention This issue is responsible by Azure service team.

Comments

@nothingmn
Copy link

Just opening the discussion to enable end-to-end support for gzip compression for the .NET Client for Azure Search.

Sample calling code:

        var response = await _indexClient.Documents.GetWithHttpMessagesAsync<T>(id, new List<string>() { "*" }, new SearchRequestOptions(), new Dictionary<string, List<string>>()
        {
            {"Accept-Encoding", new List<string>(){ "gzip", "deflate"}}
        }, cancellationToken);

Its ugly, but it does instruct the client to bring down the data gzip'd.

The problem is that the .NET Client always assumes the response will be a string response, as per:

https://github.com/Azure/azure-sdk-for-net/blob/psSdkJson6/src/SDKs/Search/DataPlane/Microsoft.Azure.Search/GeneratedSearchService/DataSourcesOperations.cs#L296

The client needs to check for the Content-Encoding header, and if gzip, handle it appropriately.

Thanks.

@brjohnstmsft brjohnstmsft self-assigned this Sep 22, 2017
@brjohnstmsft
Copy link
Member

The code you've pointed out is generated by the AutoRest tool. Any fix would need to originate there. I suggest opening an issue in the Azure/autorest repo.

@nothingmn
Copy link
Author

Thanks Bruce, I just posted it over here:

https://github.com/Azure/autorest/issues/2604

@bsiegel bsiegel added the Service Attention This issue is responsible by Azure service team. label Sep 26, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Search Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

3 participants