diff --git a/postgrest/_async/client.py b/postgrest/_async/client.py index 2b480c42..4c9a102f 100644 --- a/postgrest/_async/client.py +++ b/postgrest/_async/client.py @@ -108,9 +108,7 @@ def rpc( This method now returns a :class:`AsyncFilterRequestBuilder` which allows you to filter on the RPC's resultset. """ - method = "POST" - if head or get: - method = "HEAD" if head else "GET" + method = "HEAD" if head else "GET" if get else "POST" headers = Headers({"Prefer": f"count={count}"}) if count else Headers()