Skip to content

adds support for text plain endpoints#1397

Merged
baywet merged 23 commits intomainfrom
feature/text-plain
Mar 18, 2022
Merged

adds support for text plain endpoints#1397
baywet merged 23 commits intomainfrom
feature/text-plain

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 force-pushed the feature/text-plain branch from 0b0895d to deab307 Compare March 16, 2022 12:31
@baywet baywet marked this pull request as ready for review March 17, 2022 20:01
baywet added 2 commits March 17, 2022 16:02
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
@sonarqubecloud
Copy link

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

@baywet baywet requested a review from andrueastman March 18, 2022 12:49
Copy link
Contributor

@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