Readme

This val is part of a series of examples to introduce "val.town" in my computer science course at Stuttgart University of Applied Sciences.

The idea is to motivate even first-semester students not to wait but to put their ideas into practice from the very beginning and implement web apps with frontend and backend.

It contains a very simple HTTP end point which extracts the URL path (after the val base URL) and any query/search parameters. In contrast to some other solutions (including the one suggested by Townie), this code takes into account that query parameters may appear multiple times in order to represent a list of values.

In order to use it, send a request similar to the following

https://rozek-gdi_urlparserservice.web.val.run/url/path?bool=true&number=3.14&string=text&list=false&list=2,72&list="hi!"

The code was created using Townie - with only a few small manual corrections.

This val is licensed under the MIT License.

Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
rozek-gdi_urlparserservice.web.val.run
Updated: October 6, 2024