U++ framework
Do not panic. Ask here before giving up.

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 is currently offline  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

 
Read Message
Previous Topic: Skylark server GUI
Next Topic: help for new users skylark - GUI
Goto Forum:
  


Current Time: Wed May 06 00:16:16 GMT+2 2026

Total time taken to generate the page: 0.00552 seconds