current request
This block is part of the http connection group and was last modified in core v13.0.4.
current request v13.0.4 Retrieves a reference to the current HTTP Connection
- connection
httpconnection
Outputs the connection of the function that is currently running, resolved from engine state : this block has no input pins and ignores any wired value. It returns the same live reference the endpoint handler inspects, so later httpconnection_set_* blocks mutate the real request. Emits an empty connection object when no request is active; does nothing during precompile.
current request hands the incoming call to the blocks that answer it: the connection pin feeds reply in JSON and get query, a number sets the status code, and a function trigger runs the flow.
Commonly used with
One of the most-used blocks across production blueprints. It is most often wired together with:
- reply in JSON: this block feeds into it. Reply to any httpconnection as JSON body.
- get body: this block feeds into it. Returns the provided body as object, if the request method is POST or PUT.
- get query: this block feeds into it. Returns all query items if present. Query items may be given in the URI like ?query=yes.
- get params: this block feeds into it. Returns all params if present, params are optional or required parameters in API URIs, for example :name.
- headers: this block feeds into it. Returns all headers known to us in the HTTP request.
- reply with file: this block feeds into it. reply to http connection with a file.
Used in these guides
These documentation pages use or explain this block:
- Building a Reporting API
- Common Blueprint Patterns
- Block Templates, Combinations That Work
- Quickstart
- Block Quick Reference
- Build Your First API
- Finding Blocks
Version history
Introduced in v13.0.4.
Back to
http connection Return to the main group to view all sub-groups Back to connection Return to the group to view all blocks within this group 