rtype = void

Asked by Ales Klimsa on 2011-12-17

Could you advice me how could I define WS method, which doesn't returns any parameter (void) ?
Thank you

Question information

English Edit question
ladon Edit question
No assignee Edit question
Solved by:
Ales Klimsa
Last query:
Last reply:
jsgaarde (jakob-simon-gaarde) said : #1

In which way should it return void?
(1) Do you want it to mime json-rpc's notification (udp-like transmission where you send a request but never recieve a reponse)
(2) Or do you want a normal response just without return values?

if 2:
  In the current Ladon implementation methods must return a result, so the easiest solution is to return a dummy int,
  bool or empty string. You can also create a new class inheriting CustomResponse (ladon.server.customresponse). You can use
  such classes as rtype to methods and control the http response 100%.

See example here:

Best Regards
Jakob simon-Gaarde

Ales Klimsa (ales-klimsa) said : #2

I need response without return values. Probably I will return int or boolean value. Thanks for answer