1

I am trying ServiceStack to develop few web services, but I am unable to configure method having null as input.

public class UserService : IService
{
   public object Get()
   {
       //gets all users 
       //not working
   }
  public object Get(FindUser request)
  {
       //this works
  }
}

public override void Configure(Container container)
{ 
    Routes
   .Add<FindUser>("/user/{id}") //this works
   .Add(null, "/user");//how to configure this route
}

1 Answer 1

0

There is no concept of a null input, a client must call a specific Service and each Service in ServiceStack needs a request DTO which defines the service entry point and the Request that it receives - that Request DTO can be empty.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.