Question

Reading Multi-line Text files using the HTTP Client Processor

  • 7 December 2023
  • 0 replies
  • 15 views

Background

  • The TEXT Data Format parser breaks-up text files containing multiple lines into individual records for each line.
  • Unlike the HTTP Client Origin, the HTTP Client Processor creates one HTTP request for every input record, and only outputs one record per HTTP response.
  • This means the HTTP Processor will only return the first record if the HTTP Response data is split into multiple records which can cause issues when trying to read multi-line HTTP Responses.

 

Solution

In order to read multi-line TEXT responses via the HTTP Processor, set the Data Format to BINARY which will read the entire HTTP Response as a single BYTE_ARRAY record.

 

The BYTE_ARRAY data can then be converted into a String using the Field Converter Processor to output.

 


0 replies

Be the first to reply!

Reply