Http.GetJsonAsync in net core 3? RRS feed

  • Question

  • User1021841275 posted

    So, previously I did:

    obj.MyObject[] MyObj;

    MyObj = await Http.GetJsonAsync<obj.MyObject[]>(String.Format("api/Data/getData?StrLmid={0}", mYfast.lmId));

    What is the new way of doing this (net core 3)? I read that I should use GetStreamAsync somewhere, but how?


    Thursday, September 26, 2019 12:17 PM

All replies

  • User1021841275 posted

    This might have to do with the fact I switched to server side blazor. I probably have to register the HttpClient in startup.
    I tried but can't get the hang of it.


    Thursday, September 26, 2019 1:22 PM
  • User1021841275 posted

    This is probably the reason: https://github.com/aspnet/Blazor/issues/1588

    I would still like to keep my original code, is there any way to do this server-side?

    Thursday, September 26, 2019 3:20 PM