Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/views/docs/functions-develop.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ return function ($context) {
<pre class="line-numbers"><code class="prism language-python" data-prism>import json

def main(context):
context.log(context.req.bodyRaw) # Raw request body, contains request data
context.log(context.req.body_raw) # Raw request body, contains request data
context.log(json.dumps(context.req.body)) # Object from parsed JSON request body, otherwise string
context.log(json.dumps(context.req.headers)) # String key-value pairs of all request headers, keys are lowercase
context.log(context.req.scheme) # Value of the x-forwarded-proto header, usually http or https
Expand All @@ -576,7 +576,7 @@ def main(context):
context.log(context.req.host) # Hostname from the host header, such as awesome.appwrite.io
context.log(context.req.port) # Port from the host header, for example 8000
context.log(context.req.path) # Path part of URL, for example /v1/hooks
context.log(context.req.queryString) # Raw query params string. For example "limit=12&offset=50"
context.log(context.req.query_string) # Raw query params string. For example "limit=12&offset=50"
context.log(json.dumps(context.req.query)) # Parsed query params. For example, req.query.limit

return context.res.send("All the request parameters are logged to the Appwrite Console.")</code></pre>
Expand All @@ -588,7 +588,7 @@ def main(context):
<pre class="line-numbers"><code class="prism language-ruby" data-prism>require 'json'

def main(context)
context.log(context.req.bodyRaw) # Raw request body, contains request data
context.log(context.req.body_raw) # Raw request body, contains request data
context.log(JSON.generate(context.req.body)) # Object from parsed JSON request body, otherwise string
context.log(JSON.generate(context.req.headers)) # String key-value pairs of all request headers, keys are lowercase
context.log(context.req.scheme) # Value of the x-forwarded-proto header, usually http or https
Expand All @@ -597,7 +597,7 @@ def main(context)
context.log(context.req.host) # Hostname from the host header, such as awesome.appwrite.io
context.log(context.req.port) # Port from the host header, for example 8000
context.log(context.req.path) # Path part of URL, for example /v1/hooks
context.log(context.req.queryString) # Raw query params string. For example "limit=12&offset=50"
context.log(context.req.query_string) # Raw query params string. For example "limit=12&offset=50"
context.log(JSON.generate(context.req.query)) # Parsed query params. For example, req.query.limit

return context.res.send("All the request parameters are logged to the Appwrite Console.")
Expand Down
2 changes: 1 addition & 1 deletion app/views/docs/functions-execute.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use Appwrite\Utopia\View;
</div>

<p>
Alternatively you can <a href="/docs/functions-deploy#domain">add a custom domain</a> to your Appwrite Function.
Alternatively you can <a href="/docs/functions-deploy#domains">add a custom domain</a> to your Appwrite Function.
</p>

<h2><a href="#rest" id="rest">REST API</a></h2>
Expand Down