POSTing to RPC endpoint: mixing querystring and body #4505
-
|
I can't seem to figure out why this isn't working. If I understand correctly, I should be able to mix the querystring and body payload to provide my RPC with parameters. After testing, I've stripped my problem down to the fact that I apparently can't use the querystring to supply parameters. This is my test function: create or replace function kvk.test(
gmcode text
)
returns json
language sql
stable
as $$
select
json_build_object(
'gmcode', gmcode
)
$$;Now, when I try to call this method via {
"code": "PGRST100",
"details": "unexpected \"G\" expecting \"not\" or operator (eq, gt, ...)",
"hint": null,
"message": "\"failed to parse filter (GM1680)\" (line 1, column 1)"
}Instead, if I supply the argument in the body of the request the rpc call works as expected. What am I missing? PS: This is a stripped down test, the original function requires more arguments that are passed in the body of the POST request. The reason I want |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Querystring arguments are not supported for POST. See also #3562. |
Beta Was this translation helpful? Give feedback.
Querystring arguments are not supported for POST. See also #3562.