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

adds support for text plain endpoints #1397

Merged
merged 23 commits into from
Mar 18, 2022
Merged

adds support for text plain endpoints #1397

merged 23 commits into from
Mar 18, 2022

Conversation

baywet
Copy link
Member

@baywet baywet commented Mar 15, 2022

Summary

fixes #878

Adds support for serializing/deserializing scalar values from text/plain content. A good example usage of that is /users/$count which returns the result as text plain.

int? countResult = await client.Users.Count.GetAsync(h => {
    h.Add("ConsistencyLevel", "eventual"); // this header is only required for the identity APIs
});
Console.WriteLine($"users in tenant {countResult}");

Generation diff

microsoft/kiota-samples#565

@baywet baywet added this to the Community Preview milestone Mar 15, 2022
@baywet baywet self-assigned this Mar 15, 2022
@baywet baywet marked this pull request as ready for review March 17, 2022 20:01
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
@sonarcloud
Copy link

sonarcloud bot commented Mar 18, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

97.1% 97.1% Coverage
0.0% 0.0% Duplication

Copy link
Member

@andrueastman andrueastman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@baywet baywet merged commit fb3a584 into main Mar 18, 2022
@baywet baywet deleted the feature/text-plain branch March 18, 2022 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for raw content in text/plain responses
2 participants