Cannot send content-body with GET request

后端 未结 1 1324
半阙折子戏
半阙折子戏 2020-12-21 04:43

I am trying to execute a simple \"request body search\" on Elasticsearch like the following example but using .NET instead of curl

$ curl -XGET \'http://loca         


        
相关标签:
1条回答
  • 2020-12-21 05:12

    Changing the Method to POST is a workaround.

    request.Method = "POST";
    

    MSDN states that a ProtocolViolationException will be thrown if the GetResponseStream() method is called with a GET or HEAD method.

    0 讨论(0)
提交回复
热议问题