How to use Results property from AutoQuery in non ServiceStack client?

I’m experimenting with Blazor. I’m calling a ServiceStack AutoQuery service with the following:

@code {
    Tenant[] tenants;

    protected override async Task OnInitializedAsync()
    {
        tenants = await Http.GetJsonAsync<Tenant[]>
            ("http://localhost:5001/tenants");
    }

    public class Tenant
    {
        public string Name { get; set; }
    }
}

The problem I’m having is that because AutoQuery is returning the data in the the Results property of the response, rather than the root (as with a traditional web api call), it’s erroring out at GetJsonAsync<Tenant[]> because it’s not mapping correctly.

What is the proper way to do this with AutoQuery?

Disregard. I figured it out. I had to create a class that mimics the response from AutoQuery:

public class Response
{
    public Tenant[] Results { get; set; }
}

The other issue appears to be that despite it’s name, GetJsonAsync is not setting content-type header to application-json. I had to use http://localhost:5001/tenants?format=json. I don’t really like this so I’m going to figure out how to set the header with the GetJsonAsync call.