我有一个 API
[HttpPost("InsertSomething")]
public async Task<IActionResult> InsertSomething(Guid id, [FromBody] MyModel model)
{
try
{
...
Guid somethingId = await _myService.Insert(id, enz..)
当我想调用这个动作时
HttpResponseMessage result = await client.PostAsync("/MyContr/InsertSomething", content);
然后我将进入 API 的 Action。
...当你添加这样的东西时
HttpResponseMessage result = await client.PostAsync($"/MyContr/InsertSomething?id=BlaBlaBla", content);
然后我们没有进来API的Action。
我怎么解决这个问题?