Gnarus-G / rested

Language/Interpreter for easily defining and running requests to an http server.
GNU General Public License v2.0
2 stars 0 forks source link

feat: query statement #36

Closed Gnarus-G closed 11 months ago

Gnarus-G commented 11 months ago

like

get /api {
    query sort "asc"
    query filter "active"
}
Gnarus-G commented 11 months ago

nah actually, it's better if enpoint can be defined with strings for URL, so we can interpolate variables in a string, so...

let sort = "asc"
let filter = "active"
get `http://localhost:8080/api?sort=${sort}&filter=${filter}`

I'm okay with this because I don't want to introduce a new statement into the language unless absolutely necessary.