@@ -575,8 +575,8 @@ return function ($context) {
575
575
import json
576
576
577
577
def 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
580
580
context.log(json.dumps(context.req.headers)) # String key-value pairs of all request headers, keys are lowercase
581
581
context.log(context.req.scheme) # Value of the x-forwarded-proto header, usually http or https
582
582
context.log(context.req.method) # Request method, such as GET, POST, PUT, DELETE, PATCH, etc.
@@ -593,16 +593,16 @@ def main(context):
593
593
require 'json'
594
594
595
595
def 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
598
598
context.log(JSON.generate(context.req.headers)) # String key-value pairs of all request headers, keys are lowercase
599
599
context.log(context.req.scheme) # Value of the x-forwarded-proto header, usually http or https
600
600
context.log(context.req.method) # Request method, such as GET, POST, PUT, DELETE, PATCH, etc.
601
601
context.log(context.req.url) # Full URL, for example: http://awesome.appwrite.io:8000/v1/hooks?limit=12&offset=50
602
602
context.log(context.req.host) # Hostname from the host header, such as awesome.appwrite.io
603
603
context.log(context.req.port) # Port from the host header, for example 8000
604
604
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"
606
606
context.log(JSON.generate(context.req.query)) # Parsed query params. For example, req.query.limit
607
607
608
608
return context.res.text("All the request parameters are logged to the Appwrite Console.")
0 commit comments