New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add New Content-Type for Response #1
Comments
When a server returns HTML, what is the desired behavior? Should it always be interpreted as a success and nothing appended? |
Maybe requestb.in is unusual, or maybe it's dumb that they give that Content-Type, but in their case it seems like it should work.
Maybe when we get Without taking time to look one up, I don't think it's that unusual to see an HTML response in LCC deliveries. And those would have a response parsing set up to match on something like, We want LCN response info to be automatically parsed and not need regexes, of course, but I don't know. It's a messy world out there. 😣 |
Yeah. Thus far, the decision whether a response is a success, error, or failure is to be made by the integration's But when the endpoint is returning some unknown HTML, we'd need a way for the user to define what constitutes each outcome. The only mechanism we have today for that is request variables, which we've defined as the data points required by the integration to formulate the request. I'm not sure how I feel about overloading request variables with regexes (or whatever) to be used during processing of the response. Maybe it's OK. Maybe not. |
Another data point, where the type is As it happens we have a custom-built integration that they should use anyway, and they just didn't know to use that. And sure, their server is dumb for sending the wrong type header. But that's two so far, with lots more to come, I bet. Since the last comment, we've talked about adding pattern-matching rules. If this integration set a response variable of Even without those, the If an endpoint is returning HTML that someone wants to be able to parse, like, as a structured document, then that's custom integration territory, anyway. |
Their server is misbehaving in this case. Our Maybe that's not totally relevant in so far as users don't care about the underlying details. They just want it to work. We could add a new type of integration does simple text matching on the response body to determine the outcome. But again that's back to the whole question of whether to encourage the use of request variables in the response function. |
It appears that the default integration is causing unexpected issues when the response has a Content-Type of
text/html
.https://next.leadconduit.com/events/53c69751cf9d919967532f70
This mime-type is currently not supported by the default integration.
https://github.com/activeprospect/leadconduit-integration-default/blob/master/src/outbound.coffee#L9
The text was updated successfully, but these errors were encountered: