Repository: meilisearch/meilisearch-python
Issue: Meilisearch is sending a body on GET requests

<!-- This is not an exhaustive model but a help. No step is mandatory. -->

**Description**
Meilisearch is sending a body on a HTTP GET when using the client.

Meilisearch is running on GKE using image `getmeili/meilisearch:v1.1.1`. The instance is brand new with an empty index `addresses`.

```python
import json
import meilisearch


MEILISEARCH_URL = "https://***"
MEILISEARCH_API_KEY = "***"


def main():
    client = meilisearch.Client(url=MEILISEARCH_URL, api_key=MEILISEARCH_API_KEY)
    resp = client.get_all_stats()
    print(json.dumps(resp))
```

**Expected behavior**
Meilisearch should send an empty body for a HTTP GET and return:

```json
{
  "databaseSize": 192512,
  "lastUpdate": "2023-05-19T18:31:15.009505693Z",
  "indexes": {
    "addresses": {
      "numberOfDocuments": 0,
      "isIndexing": false,
      "fieldDistribution": {}
    }
  }
}
```

**Current behavior**
Meilisearch sits behind an external GCP HTTPS load balancer. The load balancer is opionated and rejects the request with a 400:

Load balancer log entry:

```json
{
  "@type": "type.googleapis.com/google.cloud.loadbalancing.type.LoadBalancerLogEntry",
  "remoteIp": "***",
  "statusDetails": "body_not_allowed"
}
```

Response from request:

```
<html>
   <head>
      <meta http-equiv="content-type" content="text/html;charset=utf-8">
      <title>400 Bad Request</title>
   </head>
   <body text=#000000 bgcolor=#ffffff>
      <h1>Error: Bad Request</h1>
      <h2>Your client has issued a malformed or illegal request.</h2>
      <h2></h2>
   </body>
</html>
```

**Screenshots or Logs**
Debugging locally you can see there is a body being sent of `'null'`:

![image](https://github.com/meilisearch/meilisearch-python/assets/53234158/077e7eb9-9c4b-47c1-af02-277769526d8a)

Looking through previous issues it looks like #586 attempted to fix this, but it's still sending a body of `null`.

Changing https://github.com/meilisearch/meilisearch-python/blob/f788922987520c0e2863df0c148bf2a68c3dab39/meilisearch/_httprequests.py#L48 to:

```
                    data=json.dumps(body) if body else "" if body == "" else None,
```

Sends a body of `None`:

<img width="1675" alt="image" src="https://github.com/meilisearch/meilisearch-python/assets/53234158/dd3752df-418c-401e-b43c-de660664f1fd">

and results in a successful request.

I'm happy to a raise a PR unless sending a body of `'null'` is intentional?

Changed files:
meilisearch/_httprequests.py, tests/errors/test_communication_error_meilisearch.py, tests/errors/test_api_error_meilisearch.py, tests/errors/test_timeout_error_meilisearch.py

diff --git a/meilisearch/_httprequests.py b/meilisearch/_httprequests.py
index 68b168e..0304693 100644
--- a/meilisearch/_httprequests.py
+++ b/meilisearch/_httprequests.py
@@ -33,7 +33,13 @@ class HttpRequests:
             self.headers["Content-Type"] = content_type
         try:
             request_path = self.config.url + "/" + path
-            if isinstance(body, bytes):
+            if http_method.__name__ == "get":
+                request = http_method(
+                    request_path,
+                    timeout=self.config.timeout,
+                    headers=self.headers,
+                )
+            elif isinstance(body, bytes):
                 request = http_method(
                     request_path,
                     timeout=self.config.timeout,
diff --git a/tests/errors/test_api_error_meilisearch.py b/tests/errors/test_api_error_meilisearch.py
index f9a4064..65cbe6e 100644
--- a/tests/errors/test_api_error_meilisearch.py
+++ b/tests/errors/test_api_error_meilisearch.py
@@ -25,7 +25,7 @@ def test_meilisearch_api_error_wrong_master_key():
 @patch("requests.post")
 def test_meilisearch_api_error_no_code(mock_post):
     """Here to test for regressions related to https://github.com/meilisearch/meilisearch-python/issues/305."""
-
+    mock_post.configure_mock(__name__="post")
     mock_response = requests.models.Response()
     mock_response.status_code = 408
     mock_post.return_value = mock_response
diff --git a/tests/errors/test_communication_error_meilisearch.py b/tests/errors/test_communication_error_meilisearch.py
index 9754aec..c2fcee7 100644
--- a/tests/errors/test_communication_error_meilisearch.py
+++ b/tests/errors/test_communication_error_meilisearch.py
@@ -12,6 +12,7 @@ from tests import MASTER_KEY
 
 @patch("requests.post")
 def test_meilisearch_communication_error_host(mock_post):
+    mock_post.configure_mock(__name__="post")
     mock_post.side_effect = requests.exceptions.ConnectionError()
     client = meilisearch.Client("http://wrongurl:1234", MASTER_KEY)
     with pytest.raises(MeilisearchCommunicationError):
diff --git a/tests/errors/test_timeout_error_meilisearch.py b/tests/errors/test_timeout_error_meilisearch.py
index 7313cfc..3d1a7ff 100644
--- a/tests/errors/test_timeout_error_meilisearch.py
+++ b/tests/errors/test_timeout_error_meilisearch.py
@@ -10,6 +10,7 @@ from tests import BASE_URL, MASTER_KEY
 
 @patch("requests.get")
 def test_client_timeout_error(mock_get):
+    mock_get.configure_mock(__name__="get")
     mock_get.side_effect = requests.exceptions.Timeout()
     client = meilisearch.Client(BASE_URL, MASTER_KEY, timeout=1)