Use form data to submit query
See original GitHub issueHi all, I recently ran into an issue with long queries (requesting a lot of fields) where the URI that is being constructed gets too long and due to the “q=” parameter that has more than 64000 characters the request is rejected (“URI too long”).
Though I admit that maybe that type of query is questionable, I found out that InfluxDB also reads the query parameter from multipart form data (see https://github.com/influxdata/influxdb/commit/f58a50c231afd6ee775ce213461c7c0043cd724f)
With the following code I was able to successfully submit a longer query to InfluxDB:
HttpClient client = new HttpClient();
MultipartFormDataContent form = new MultipartFormDataContent();
form.Add(new StringContent("..."), "u");
form.Add(new StringContent("..."), "p");
form.Add(new StringContent(reallyLargeQuery), "q");
string url = $"http://localhost:8086/query?db={this.database}";
client.PostAsync(url, form)
Would that be something that could be changed in this client?
Issue Analytics
- State:
- Created 6 years ago
- Comments:18 (10 by maintainers)
Top Results From Across the Web
How to Transform FormData into a Query String
In this article, we're going to look at the HTML for a basic form that will then have a submit event bound to...
Read more >Sending form data - Learn web development | MDN
As we'd alluded to above, sending form data is easy, but securing an application can be tricky. Just remember that a front-end developer...
Read more >When submitting a GET form, the query string is removed ...
when method is GET and form is submitted, hidden input element was sent as query parmater. Old params in action url were wiped...
Read more >How to Submit a Form with JavaScript – JS Submit Button ...
To submit a form using JavaScript, you must first create the form and add distinctive, specific attributes to the input fields.
Read more >Use a query as the record source for a form or report
You can use a query to supply data to a form or report in Access. You can use a query when you create...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Tested, works super, thanks a lot!
Deployed v8.0.1, all should be fine now. I tested both net461 and netcore2.0 and all tests now pass for both targets. Let me know. 😃
cheers