request-data
processorrequest-data
processor can be used to find the data from query string and named-path parameters or from request body.curl 'http://127.0.0.1:8000/test/?message=hello%20world'
message
with value hello world
. We can access this value in ftd
file as like below by calling request-data
processor.-- import: fastn/processors as pr -- record r-data: string message: -- r-data data: $processor$: pr.request-data -- ds.markdown: $data.message
-- fastn.dynamic-urls: # RD Test: url: /rd-test/<string:message>/ document: ftd-host/r.ftd
/rd-test/hello/
, the value data.message
would be hello
.application/json
, the body is parsed as JSON and the fields in your record are looked in the JSON as well.Have a question or need help?
Visit our GitHub Q&A discussion to get answers and subscribe to it to stay tuned.
Join our Discord channel and share your thoughts, suggestion, question etc.
Connect with our community!We welcome you to join our Discord community today.
We are trying to create the language for human beings and we do not believe it would be possible without your support. We would love to hear from you.