Skip to content
Open
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
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
custom: https://gumroad.com/l/hGYGh
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,16 @@ The body of the request.
// Return the sum of the a and b properties {a: 5, b: 1}

setResult(body.a + body.b);

## Async requests

By default the event-code will automatically be finished by a response.
Here's how to do async requests:


var done = ctx.done // remember this to end the response (async)
ctx.done = function(){} // dummy function for autoresponse (sync)

ctx.dpd.myresource.get({id: id}, function(result) {
done(result)
});