Skip to content

Conversation

srt32
Copy link
Member

@srt32 srt32 commented May 24, 2024

This change proposed supporting the use of alternative HTTP methods.

For example, now a user can define http-method=GET and then component will issue a GET request using encoded query params instead. All values other than POST will use this new approach. The default remains POST.

This change proposed supporting the use of alternative HTTP methods.

For example, now a user can define `http-method=GET` and then component will issue a `GET` request using encoded query params instead. All values other than POST will use this new approach. The default remains POST.
srt32 and others added 4 commits May 24, 2024 13:27
Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
Copy link
Contributor

@keithamus keithamus left a comment

Choose a reason for hiding this comment

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

LGTM 👍. Some tests would be handy though

@srt32 srt32 marked this pull request as ready for review May 28, 2024 15:22
@srt32 srt32 requested a review from a team as a code owner May 28, 2024 15:22
@srt32 srt32 marked this pull request as draft May 28, 2024 15:22
@srt32 srt32 marked this pull request as ready for review May 28, 2024 17:35
@srt32
Copy link
Member Author

srt32 commented May 28, 2024

I've added a spec as well as some other tweaks (that are less elegant than I would like).

@srt32 srt32 requested a review from keithamus May 29, 2024 16:34
}

get httpMethod(): string {
return this.getAttribute('http-method') || 'POST'
Copy link
Contributor

Choose a reason for hiding this comment

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

This should probably just return allowed values, eg just GET or POST. Otherwise this allows for arbotrary verbs. Might lead to undesired behaviour.

We can ship this and bugfix later if time is of the essence.

Copy link
Member Author

Choose a reason for hiding this comment

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

WDYT of 059dde3?

@srt32 srt32 merged commit 840ca05 into main May 29, 2024
@srt32 srt32 deleted the srt32-support-other-http-methods branch May 29, 2024 17:25
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.

3 participants