Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

FlurlHttpException: Call failed with status code 500 (Internal Server Error): POST

$
0
0

I want to send requests to the API from the UI with Blazor .Net Core

This is how I do on the UI:

@code {    OrderDto orderDto = new();    protected override async Task OnInitializedAsync()    {        var urlString = "myUrlString";        var orderListResponse = await urlString.PostJsonAsync(orderDto);    }   }

And that's my API part:

[Route("getOrderList")][HttpPost]public async Task<ActionResult<List<OrderDto>>> GetOrderList(OrderDto orderDto) {               var response = await _orderService.OrderList(orderDto);    return response;}

I can get the data from _orderService but when I come to flurl's response, I get the 500 error and I don't understand why it gives this error.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>