Forum Discussion
Can the incoming request also send a parameter of “file_type”? Then you could use a router based on this value to handle it as JSON or XML or any other file_type that is sent.
- Surendar8 years agoContributor
Yes we have done the same and found the solution for the above approach.
In binary router we are validating the JSON or XML input streams and then doing our further works.
Thanks for your attention.
- rodhamann7 years agoNew Contributor
We did the same, when we tested with a FIle Reader snap and specified a file from SLDB, we found that the field we need to check is ‘x-amz-meta-mimetype’. When we remove the File Reader snap, create a task and use postman… the input does not have this field. We tried using content-type and this fails too… Could you please provide what the conditions in the router were?
- tstack7 years agoFormer Employee
Do you mean a Triggered Task? The Content-Type header for a POST (and a few others) come in as pipeline parameters. To get the Content-Type, you’d use:
_CONTENT_TYPE