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

Add support for multi-valued headers #2032

Closed
baywet opened this issue Dec 6, 2022 · 2 comments · Fixed by #2045
Closed

Add support for multi-valued headers #2032

baywet opened this issue Dec 6, 2022 · 2 comments · Fixed by #2045
Assignees
Labels
Csharp Pull requests that update .net code enhancement New feature or request fixed generator Issues or improvements relater to generation capabilities. Go Java TypeScript Pull requests that update Javascript code
Milestone

Comments

@baywet
Copy link
Member

baywet commented Dec 6, 2022

Bulk of the conversation here.
We need to rely on a structure other than a dictionary in request information and request configuration that would handle multiple values and folding when generating the request, as well as headers casing.

@baywet baywet added enhancement New feature or request Csharp Pull requests that update .net code TypeScript Pull requests that update Javascript code Go Java generator Issues or improvements relater to generation capabilities. labels Dec 6, 2022
@baywet baywet self-assigned this Dec 6, 2022
@baywet baywet added this to Kiota Dec 6, 2022
@baywet baywet moved this to Todo in Kiota Dec 6, 2022
@baywet baywet added this to the Kiota GA milestone Dec 6, 2022
@andrueastman
Copy link
Member

HttpHeaders is held in a collection of KeyValuePair<IEnumerable<string> that could possibly be helpful.

https://learn.microsoft.com/en-us/dotnet/api/system.net.http.headers.httpheaders?view=net-7.0#definition

If the specified header does not exist, the Add method inserts a new header into the list of header name/value pairs.
If the specified header is already present, values are added to the comma-separated list of values associated with the header.

@baywet
Copy link
Member Author

baywet commented Dec 7, 2022

Thanks for the suggestion, I've always found that API clunky at best.
I've drafted an API for dotnet, let me know what you think: microsoft/kiota-dotnet#55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Csharp Pull requests that update .net code enhancement New feature or request fixed generator Issues or improvements relater to generation capabilities. Go Java TypeScript Pull requests that update Javascript code
Projects
Archived in project
2 participants