[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Artanis] accept POST in "application" mode
From: |
Nala Ginrut |
Subject: |
Re: [Artanis] accept POST in "application" mode |
Date: |
Wed, 05 Sep 2018 16:06:37 +0800 |
User-agent: |
mu4e 1.1.0; emacs 25.1.1 |
Hi Julio!
Julio Claudio Matus Ramirez writes:
> Hello.
>
> I'm using artanis in "application mode" (with art work, not running from
> a script-like single file, I think you call that "script mode").
>
> I see from the documentation that to accept data from POST requests, in
> script mode, you have to define a router with the method "post" for the path
> in question.
> I can't find in the documentation how to make that for an application made
> with "art".
>
> Can you tell me how to define a path (controller/view) in which I can
> use POST data?
I think you mean that you can't define a POST controller by the
controller define helper function. For this purpose, you should use
(get "/your_prefer_url" handler)
To be clarified, use (http-method "/your_prefer_url" handler) is not
"script mode" only, it could appear in "application mode" (yes, MVC).
The controller is defined as GET in default.
>
> P.S.
> I see there's a ".route" file in the application dir that might be
> related, but I tried changing it and it gets overwritten. It'd be nice
> to have documented its purpose too. If you tell me I'll add it to the
> manuals.
The route module is still suspended since I've always been blocking by
other higher priority tasks, file descriptors leaking, more efficient URL
remapping, websocket, etc...
For now, you may just simply ignore the .route file.
If you just want to handle RESTful APIs, the advanced route mapping is
unecessary for
simple cases.
--
GNU Powered it
GPL Protected it
GOD Blessed it
HFG - NalaGinrut
Fingerprint F53B 4C56 95B5 E4D5 6093 4324 8469 6772 846A 0058
signature.asc
Description: PGP signature
- [Artanis] accept POST in "application" mode, Julio Claudio Matus Ramirez, 2018/09/03
- Re: [Artanis] accept POST in "application" mode,
Nala Ginrut <=
- Re: [Artanis] accept POST in "application" mode, Julio Claudio Matus Ramirez, 2018/09/10
- Re: [Artanis] accept POST in "application" mode, Nala Ginrut, 2018/09/12
- Re: [Artanis] accept POST in "application" mode, Julio Claudio Matus Ramirez, 2018/09/13
- Re: [Artanis] accept POST in "application" mode, Nala Ginrut, 2018/09/14
- Re: [Artanis] accept POST in "application" mode, Julio Claudio Matus Ramirez, 2018/09/14
- Re: [Artanis] accept POST in "application" mode, Nala Ginrut, 2018/09/16