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

Extend builtin.HttpRequest to have separate type parameters for body, path parameters, headers, and query? #2230

Closed
alecthomas opened this issue Aug 1, 2024 · 0 comments · Fixed by #2422
Assignees

Comments

@alecthomas
Copy link
Collaborator

alecthomas commented Aug 1, 2024

This gives us strong typing, without having to merge values from different parts of the request payload into the "body" type as we are doing currently.

Old:

  export data HttpRequest<Body> {
    method String
    path String
    pathParameters {String: String}
    query {String: [String]}
    headers {String: [String]}
    body Body
  }

New:

data HttpRequest<In, Path, Query, Headers> {
    method String
    path String
    pathParameters Path
    query Query
    headers Headers
    body Body
}

Too many type parameters? 🤔

@github-actions github-actions bot added the triage Issue needs triaging label Aug 1, 2024
@ftl-robot ftl-robot mentioned this issue Aug 1, 2024
@gak gak added next Work that will be be picked up next and removed triage Issue needs triaging labels Aug 1, 2024
@stuartwdouglas stuartwdouglas self-assigned this Aug 17, 2024
@github-actions github-actions bot removed the next Work that will be be picked up next label Aug 17, 2024
stuartwdouglas added a commit that referenced this issue Aug 19, 2024
stuartwdouglas added a commit that referenced this issue Aug 19, 2024
stuartwdouglas added a commit that referenced this issue Aug 19, 2024
stuartwdouglas added a commit that referenced this issue Aug 19, 2024
stuartwdouglas added a commit that referenced this issue Aug 19, 2024
stuartwdouglas added a commit that referenced this issue Aug 19, 2024
stuartwdouglas added a commit that referenced this issue Aug 19, 2024
stuartwdouglas added a commit that referenced this issue Aug 19, 2024
stuartwdouglas added a commit that referenced this issue Aug 19, 2024
stuartwdouglas added a commit that referenced this issue Aug 19, 2024
stuartwdouglas added a commit that referenced this issue Aug 19, 2024
stuartwdouglas added a commit that referenced this issue Aug 19, 2024
safeer pushed a commit that referenced this issue Aug 19, 2024
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 a pull request may close this issue.

3 participants