@@ -575,8 +575,8 @@ return function ($context) {
575575import json
576576
577577def main(context):
578- context.log(context.req.bodyText) # Raw request body, contains request data
579- context.log(json.dumps(context.req.bodyJson)) # Object from parsed JSON request body, otherwise string
578+ context.log(context.req.body_text) # Raw request body, contains request data
579+ context.log(json.dumps(context.req.body_json)) # Object from parsed JSON request body, otherwise string
580580 context.log(json.dumps(context.req.headers)) # String key-value pairs of all request headers, keys are lowercase
581581 context.log(context.req.scheme) # Value of the x-forwarded-proto header, usually http or https
582582 context.log(context.req.method) # Request method, such as GET, POST, PUT, DELETE, PATCH, etc.
@@ -593,16 +593,16 @@ def main(context):
593593require 'json'
594594
595595def main(context)
596- context.log(context.req.bodyText) # Raw request body, contains request data
597- context.log(JSON.generate(context.req.bodyJson)) # Object from parsed JSON request body, otherwise string
596+ context.log(context.req.body_text) # Raw request body, contains request data
597+ context.log(JSON.generate(context.req.body_json)) # Object from parsed JSON request body, otherwise string
598598 context.log(JSON.generate(context.req.headers)) # String key-value pairs of all request headers, keys are lowercase
599599 context.log(context.req.scheme) # Value of the x-forwarded-proto header, usually http or https
600600 context.log(context.req.method) # Request method, such as GET, POST, PUT, DELETE, PATCH, etc.
601601 context.log(context.req.url) # Full URL, for example: http://awesome.appwrite.io:8000/v1/hooks?limit=12&offset=50
602602 context.log(context.req.host) # Hostname from the host header, such as awesome.appwrite.io
603603 context.log(context.req.port) # Port from the host header, for example 8000
604604 context.log(context.req.path) # Path part of URL, for example /v1/hooks
605- context.log(context.req.queryString) # Raw query params string. For example "limit=12&offset=50"
605+ context.log(context.req.query_string) # Raw query params string. For example "limit=12&offset=50"
606606 context.log(JSON.generate(context.req.query)) # Parsed query params. For example, req.query.limit
607607
608608 return context.res.text("All the request parameters are logged to the Appwrite Console.")
0 commit comments