How to return plain text from function? #1994
-
I am use postgrest as part of supabsase. And i need to response plain text to user from function. Function below work like a charm, but result always inside double quotes. How to return plain text without quotes? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Have a look at the fine docs here: https://postgrest.org/en/v8.0/api.html#plain-text-output You need to make the request with |
Beta Was this translation helpful? Give feedback.
-
@wolfgangwalther Yep, thank you, but i have a problem with that method. I am use it with external service webhook and can't set request header manually. |
Beta Was this translation helpful? Give feedback.
Have a look at the fine docs here: https://postgrest.org/en/v8.0/api.html#plain-text-output
You need to make the request with
Accept: text/plain
. This should then take care of theContent-Type
header automatically, if I remember correctly, no need to manually set that.