Request.CreateResponse<T> doesn't use the runtime type of the object for content-negotiation. This would be an issue when the formatter doesn't responds to CanWriteType(typeof(object)) with false (example ODataMediaTypeFormatter). An example scenario can be found [here](https://gist.github.com/raghuramn/5084608).
Having a non-generic overload where we can specify T would be useful.
Comments: Without this overload I had to write code like this, ``` public static class HttpRequestMessageExtensions { private static MethodInfo _createResponse = InitCreateResponse(); private static MethodInfo InitCreateResponse() { Expression<Func<HttpRequestMessage, HttpResponseMessage>> expr = (request) => request.CreateResponse<object>(HttpStatusCode.OK, default(object)); return (expr.Body as MethodCallExpression).Method.GetGenericMethodDefinition(); } // Content negotiation doesn't use the runtime type of the object. This helper method is CreateResponse overload that passes // the specified type to content negotiation. public static HttpResponseMessage CreateResponse(this HttpRequestMessage request, HttpStatusCode status, Type type, object value) { return _createResponse.MakeGenericMethod(type).Invoke(null, new[] { request, status, value }) as HttpResponseMessage; } } ```
Having a non-generic overload where we can specify T would be useful.
Comments: Without this overload I had to write code like this, ``` public static class HttpRequestMessageExtensions { private static MethodInfo _createResponse = InitCreateResponse(); private static MethodInfo InitCreateResponse() { Expression<Func<HttpRequestMessage, HttpResponseMessage>> expr = (request) => request.CreateResponse<object>(HttpStatusCode.OK, default(object)); return (expr.Body as MethodCallExpression).Method.GetGenericMethodDefinition(); } // Content negotiation doesn't use the runtime type of the object. This helper method is CreateResponse overload that passes // the specified type to content negotiation. public static HttpResponseMessage CreateResponse(this HttpRequestMessage request, HttpStatusCode status, Type type, object value) { return _createResponse.MakeGenericMethod(type).Invoke(null, new[] { request, status, value }) as HttpResponseMessage; } } ```