Open tmdude9586 opened 8 years ago
That sounds like a reasonable addition.
As a workaround, could you return this.StatusCode(HttpStatusCode.NoContent)
? AFAICT, this would achieve the same result, while keeping the return value of your method Task<IHttpActionResult>
.
All that said, I'd recommend avoiding 204 responses.
is this still in need of doing?
Yes, I think I'd have closed the issue if this was resolved.
I have a controller action which has the following signature
public async Task Delete(int id);
it returns Task so that the webapi will return a 204 No Content by default. However the RouteLinker.GetUriAsync is type parameterized and expects the 2nd argument to be a parameterized Task.
I think there should be a non generic version of the method that has the following signature:
public Task<Uri> GetUriAsync<T>(Expression<Func<T, Task>> method);