conductor icon indicating copy to clipboard operation
conductor copied to clipboard

HTTP task output content other than application/json

Open rituparnopal opened this issue 7 years ago • 4 comments

I have some microservices which gives content other than application/json. However it is not working. If I set the contentType as text/plain under http_request it gives an exception that Message Convertor not found. Is it that Conductor is at present equipped to work with only application/ json content?

rituparnopal avatar Jun 25 '19 11:06 rituparnopal

@rituparnopal As mentioned here, currently Conductor HTTP task only supports application/json content type. If your api response is not json, you could implement this task as a SIMPLE task and write a worker to handle this response and transform the task output into json. Please also feel free to submit a PR with modifications to the HTTP task to enable other content types.

apanicker-nflx avatar Jul 16 '19 00:07 apanicker-nflx

But it is written in the table under HTTP Task- contentType | Content Type - supported types are text/plain, text/html and, application/json So is this wrong? (https://netflix.github.io/conductor/configuration/systask/) I tried text/plain but it didn't work giving MessageOutputFormatException. For api which are xml based I am using worker only.

rituparnopal avatar Jul 16 '19 06:07 rituparnopal

Thanks for reporting the error in the docs. We will update this. For now, I would recommend using a worker for this api as well. And also, feel free to submit a PR with modifications to the HTTP task to add support for this.

apanicker-nflx avatar Aug 06 '19 00:08 apanicker-nflx

Sure, thanks!

rituparnopal avatar Aug 06 '19 11:08 rituparnopal