streamsets / tutorials

StreamSets Tutorials
Apache License 2.0
348 stars 192 forks source link

the same data format,http client processor can send data,but http client destinations throws error #115

Closed qinzl1 closed 5 years ago

qinzl1 commented 5 years ago

destinations: image image image processor: image image

metadaddy commented 5 years ago

In the destination, you need to specify TEXT as the data format, with /json_str as the text field. Specifying JSON data format means that the entire record will be JSON-encoded, so it will actually send something like {"json_str":"{\"appCode\":...}"} when you want to just send {"appCode":...}"}

Alternatively, ensure that the record contains just the appCode, resourceType etc fields and choose JSON data format.

Create a request bin at https://requestbin.com/, use the request bin URL for both HTTP stages and you'll easily see any differences between the requests.

By the way - please don't create issues on the tutorial for general questions. There are plenty of ways to interact with the StreamSets community: https://streamsets.com/community