0

I'm trying to put a body in a get request using Flurl on c#. I need to make a code that makes a get request as this curl :

curl -X GET "localhost:9200/my-index-000001/_search?from=40&size=20&pretty" -H 'Content-Type: application/json' -d'
{
  "query": {
    "term": {
      "user.id": "kimchy"
    }
  }
}
'

Hope you can help me :)

  • 1
    Generally request body is ignored with a GET request, so its not surprising that there isn't an API to specifically append a body with a GET request. – Nate Jun 05 '23 at 17:40
  • 1
    Just use POST instead. Elasticsearch [supports](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html) this and it's [more correct](https://stackoverflow.com/a/983458/62600) in terms of what "should" be allowed by a RESTful API. – Todd Menier Jun 06 '23 at 03:21

0 Answers0