User post empty body in the request to Ultra task


We are building a Ultra task. Eventually it will be an API that user will post xml data in the body of request to this Ultra task.

One use case is that when user post empty body in the request to this Ultra pipeline, how would I check in the pipeline that user post empty data in the request.

Note that the request will not be in Json format, it will be XML format.


If you use a Binary To Document at the start of your pipeline then its output will look like this:

    "task_name": "...",
    "content-length": "164190",
    "origin": "chrome-extension://aicmkgpgakddgnaphhhpliifpcfhicfo",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><integrationMessage>...</integrationMessage>",
    "accept-language": "en-US,en;q=0.9",
    "method": "POST",
    "query": {},

The request body is contained in the “content” attribute of the document. Then, for example, you could use a router snap which routes based on the length of content.

Thanks, this helps!