I'm trying to send a POST request to my local influxDB. I'm getting StatusCode: 400, ReasonPhrase: 'Bad Request'"
HttpClient client = new HttpClient();
HttpRequestMessage requestMessage = new HttpRequestMessage(HttpMethod.Post, "http://localhost:8086/write?db=mydb");
requestMessage.Content = new StringContent("cpu_load_short, host = server01, region = us - 345345 value = 0.34564 345345");
HttpResponseMessage response = client.SendAsync(requestMessage).GetAwaiter().GetResult();
In my Postman I put "http://localhost:8086/write?db=mydb" and "cpu_load_short,host=server01,region=us-345345 value=0.34564 345345" in my body(raw) and it works