VueNuxt ServiceStack/Client request clarification

First time checking out dotnet-new vue-nuxt sample.

When looking at the ServiceModel Hello routes [Route("/hello/{Name}")] it indicates the route is at website root and with a lowercase hello.

However when looking at the browser developer tools network tab, it shows the request is going to http://localhost:3000/json/reply/Hello?name=asdf.

The JsonServiceClient is initialized with root. export const client = new JsonServiceClient("/");

Where is the /json/reply coming from and why isn’t the route with a lowercase hello? I’m assuming the case is due to the JS.


The [Route] on the Request DTO is a custom route you define that you want your Services available from, it’s unrelated to the pre-defined Routes that’s automatically available in ServiceStack to call your Services.

All of ServiceStack Service clients except for the C#/.NET Service Clients use the pre-defined routes to call your Services when sending Typed Request DTOs.

If you want to call your custom route instead you will need to specify the path and Typed Response DTO, e.g:

const client = new JsonServiceClient("/");
const response = await client.get<HelloResponse>(`/hello/${name}`);