mock connection

This block is part of the http group and was last modified in core v12.0.7.

mock connection v12.0.7

Creates a dummy HTTP connecton with a callback to catch the reply.

In pins 5 + flow
  • flow
    flow
  • url required
    value

    The URI this API acts for.

  • method
    value

    The method for this API request, defaults to GET.

  • body
    object

    In case of a POST, PUT or DELETE a body can be given.

  • query
    object

    Query part added to the URI.

  • Reply required
    inpinfunction
Out pins 1 + flow
  • flow
    flow
  • httpconnection
    httpconnection

Despite the name, the Go executor performs a REAL HTTP request to the url input (method defaults to GET) and outputs a response object {status, reply}, where reply is the parsed JSON body or the raw body text when it is not JSON. The reply inpin function is never called, and the body and query pins are not sent. An empty url returns status 400 with reply MISSING_URL; a request error returns status 500 with the error message.

A typical wiring for mock connection: a function trigger starts the flow; value feeds the url pin; the flow out pin feeds debug.

Studio canvas example for the mock connection block: typical wiring for mock connection.

Version history

Introduced in v12.0.7.


Back to http Return to the main group to view all sub-groups Back to http Return to the group to view all blocks within this group