routing - Route Attribute Ignored -


according multiple documentation sources, routes can defined attributes on dto. have following dtos (the last 1 in different file):

[route("/hdos", "get")] public class gethdos {     public bool includeadminusers { get; set; } }  [route("/hdos/{id}", "get")] public class gethdo {     public guid id { get; set; } }  [route("/hdos/{hdoid}/facilities", "get")] public class gethdofacilities {     public guid hdoid { get; set; } } 

housed following services (the last 1 in different file):

public object get(gethdos request) {     return _hdos.getall(request.includeadminusers); }  public object get(gethdo request) {     return _hdos.getbyid(request.id) }  public object get(gethdofacilities request) {     return _hdos.getfacilities(request.hdoid); } 

a call of

/hdos /hdos/a82b955195e34bfda2fdde7da68f8992 /hdos/a82b955195e34bfda2fdde7da68f8992/facilities 

returns method not supported. if call them class name, routes hit. there missing? need activate these routes in apphost somehow?

it looks servicestack maps route differently rest , http types. didn't mention in question calling json/syncreply/hdos because thought json/syncreply part of every call. wrong. if that, dto class name route.

to use route declared on dto attribute, call route, leaving off json/syncreply. inverse not directly stated in documentation, confused nonetheless.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -