Skip to content

fix(httpsnippet-client-api): retain casing for non-reserved headers - #768

Merged
erunion merged 1 commit into
mainfrom
fix/dont-lowercase-headers
Oct 18, 2023
Merged

fix(httpsnippet-client-api): retain casing for non-reserved headers#768
erunion merged 1 commit into
mainfrom
fix/dont-lowercase-headers

Conversation

@erunion

@erunion erunion commented Oct 18, 2023

Copy link
Copy Markdown
Member
馃殽 Resolves RM-8153

馃О Changes

This fixes a quirk in httpsnippet-client-api where even though HTTP headers are case-insensitive the TS types we generate for api are not and we are currently lowercasing all non-reserved header names we add into code snippets.

image

@erunion erunion added bug Something isn't working area:snippets Issues related to code snippets labels Oct 18, 2023
@erunion
erunion marked this pull request as ready for review October 18, 2023 21:17
@erunion
erunion requested a review from kanadgupta October 18, 2023 21:17
@erunion erunion added this to the v7 milestone Oct 18, 2023
value: 'Bar',
},
{
name: 'X-Bar',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Changed this casing because X-Bar doesn't exist in the spec for this dataset and how we construct HAR objects in the API Explorer we won't ever translate x-bar to X-Bar (because X-Bar isn't in the spec).

@erunion
erunion merged commit c60c95f into main Oct 18, 2023
@erunion
erunion deleted the fix/dont-lowercase-headers branch October 18, 2023 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:snippets Issues related to code snippets bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant