Home » U++ Library support » Skylark » Add the ability to use the same route name for different methods (GET, POST, ..)
Add the ability to use the same route name for different methods (GET, POST, ..) [message #61136] |
Fri, 22 November 2024 11:58 |
omari
Messages: 276 Registered: March 2010
|
Experienced Member |
|
|
Hi,
I am giving Skylark a try, by lanching AddressBookWeb example.
analysing the urls used are :
"submit/create:POST"
"person/create"
"submit/edit/*:POST"
"person/edit/*"
"person/delete/*"
I notice that 'submit' is used in POST instead of 'person'
this is needed in order to easys the use of Skylark with multiple entity
replacing 'submit' by 'person' then running the example ==> ASSERTION PROBLEME
ASSERT_(!DispatchMap[q].handler, "duplicate view " + String(path)
Dispatch.cpp(184)
I have invistigated this issue and i have a fix proposal:
File : Skylark/Dispatch.cpp
1 - Add this line at line 174
s << "#" << method;
2 - modify line 292 :
int qq = n.subnode.Get(part[ii] + "#" + AsString((int)method), -1);
instead of
int qq = n.subnode.Get(part[ii], -1);
mirek, please review this change.
regards
omari.
[Updated on: Fri, 22 November 2024 12:23] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Mon Feb 17 22:45:10 CET 2025
Total time taken to generate the page: 0.04035 seconds
|