This topic was automatically generated from Slack. You can find the original thread here.
King-A. J. Olly : Hi! I’m a newbie using Pipedream. I’ve reviewed all the docs, but can’t find the answer to my question, unless I’ve overlooked something. It’s likely a newbie question – I’d like to know when I send an incoming HTTP Request into Pipedream, how do I control the JSON response that is sent back to the app that the request originated from? Are we able to control this?
For more context, I’m sending a request to our CRM from a Twilio Studio HTTP Request widget. I want to use Pipedream to throttle the requests and return the data from the CRM to Twilio Studio within 10 seconds. But, when I’m doing the initial testing just with a RequestBin, when I begin to edit a workflow, I don’t see where or how to handle or edit the response being sent back to Twilio Studio. Right now, it’s getting an immediate 200 response. How do I edit/control this?
King-A. J. Olly : Okay, awesome! Thank you! I’m assuming that using $respond() anywhere in a workflow automatically tells Pipedream not to issue the automated HTTP response, but to wait for the part in the code that manually issues the response? Am I correct? Or do I need to adjust a setting somewhere for the workflow to tell Pipedream that I’m going to write the response code manually?
Tod Sacerdoti : Yes, that is correct. Note that if you use $respond() in a workflow, you must always make sure $respond() is called in your code. If you make an HTTP request to a workflow, and run code where $respond() is not called, your endpoint URL will issue a 400 Bad Request error.
King-A. J. Olly : So, if I use $respond() in one workflow, it will signal to Pipedream that I want to use it all of my workflows and essentially stop providing the default response and begin to look for it in all workflows?
Am I understanding correctly?
Will RequestBin still continue to issue 200 responses when new HTTP requests come in? Or will it also seek to be attached to a workflow and need a response to function if I use $response() anywhere in my workflows?