Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I’ve to build a cli HTTP client in Java and went with OkHttp [1], as it was widely used on Android. I’ve to add support for GET requests with a body but I wasn’t able to do it with OkHttp. The library was rather opinionated and you couldn’t add a body to a request body back then [2]. I was rather surprised, because I thought HTTP specs allowed it, while discouraging; so an HTTP library should allow this kind of usage. I went back to Apache HTTPComponents, while less fancy than OkHttp but also less opinionated, and was able to complete my client. Things may have changed, it was a few years ago.
[1] https://github.com/square/okhttp
[2] https://github.com/square/okhttp/issues/5803
[3] https://hc.apache.org/
This brings back memories. I once failed an interview because an interviewer asked me how an API could be implemented and I suggested that you could send a body with a GET request. My thinking at the time was that, even though unusual, Elasticsearch does this (2016: https://github.com/elastic/elasticsearch/issues/16024#issuec...) and it might be easier to cache than POST but I could tell that the interviewer wasn't happy with my reponse.
Glad that a QUERY method will be provided instead.
Related posts
- Chat with any GPT right through your favorite text editor
- Elasticsearch Version 9
- Is there a server simulator available for testing API endpoints with low code or no code configuration?
-
Elasticsearch VS openobserve - a user suggested alternative
2 projects | 30 Aug 2023
- A dedicated Elasticsearch query language (ES|QL)