Hi i'm writing a python functions and i need to retrieve request body.
Server: Appwrite cloud. CLI: 6.0.0 The Functions is in local dev with Appwrite CLI.
I find this code snippet in functions doc:
import json
def main(context):
context.log(context.req.bodyText) # Raw request body, contains request data
(Source: https://appwrite.io/docs/products/functions/develop#request)
but if i try it, i receive:
context.log(context.req.bodyRaw) # Raw request body, contains request data
AttributeError: 'Request' object has no attribute 'bodyRaw'
This is Postman body view:
Use req.bodyRaw
, Cloud is still on 1.5.10
while the docs point to the 1.6.x
release.
basically use the deprecated methods on cloud.
I had tried with the previous version but:
where:
req = context.req
context.log(req.bodyRaw)
You seem to be using the CLI local development, I don't think it might be compatible with 1.5.10
. @Meldiron is it though?
Yes, I am using local CLI development to test the function before loading it. I didn't find anything in the doc about version incompatibilities :appwritemandancing:
Recommended threads
- Got message for auto payment of 15usd fo...
how did this happen? 1. i claimed my 50usd credits via jsm hackathon - https://hackathon.jsmastery.pro/ 2. it asked me which org. to apply the credits on, i se...
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...