Closed
Description
Elastic.Clients.Elasticsearch version: 8.0.0-rc.2, 8.0.0 and 8.0.1
Dynamic HttpMethod
Steps to reproduce:
- Index an object with no ID inference
public class Person
{
public string? FirstName { get; init; }
}
var response = await client.IndexAsync(new Person { FirstName = "Steve" }, request => request.Index("product-index_001"));
Expected behavior
Expect the HttpMethod to be POST, as no ID is inferrable for the URL path.
Actual behavior
HttpMethod is PUT, which results in a 405 status code from the server for the URL path /product-index_001/_doc/