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

[Net\serve] add support for Function param / request handler #1752

Open
drkameleon opened this issue Oct 1, 2024 · 0 comments · May be fixed by #1753
Open

[Net\serve] add support for Function param / request handler #1752

drkameleon opened this issue Oct 1, 2024 · 0 comments · May be fixed by #1753
Assignees
Labels
enhancement New feature or request → Net

Comments

@drkameleon
Copy link
Collaborator

drkameleon commented Oct 1, 2024

Right now, serve works as some sort of opinionated Sinatra, written internally in Arturo.
This isn't that bad, but it's probably too restricting, being an stdlib function.

What we could do is:

  • add support for Function params
  • when the user passes a $[req][...] parameter, this function will receive a dictionary with all the request details
  • and it will expect a request answer (= dictionary) as a response

This way we will allow for even more fine-tuned handling of the whole server.

Also, this would allow whatever Sinatra- or non-Sinatra-like alternative to be developed in the form e.g. of external packages.

As usual: ease of use, yes; but also, flexibility.
(Arturo should not be about showing us the ONE way to do things, but instead enabling us different paths to... the solution 😉 )

@drkameleon drkameleon added enhancement New feature or request → Net labels Oct 1, 2024
@drkameleon drkameleon self-assigned this Oct 1, 2024
@drkameleon drkameleon linked a pull request Oct 1, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request → Net
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant