Qian Xu created SQOOP-1795:
------------------------------

             Summary: Sqoop2: Retrieve Http post data in plausible manner
                 Key: SQOOP-1795
                 URL: https://issues.apache.org/jira/browse/SQOOP-1795
             Project: Sqoop
          Issue Type: Sub-task
            Reporter: Qian Xu
            Assignee: Qian Xu
            Priority: Minor


The situation of dealing with the post data is very tricky IMHO. 
1. {{getRequest().getReader()}} must be called at the first place. As reader 
cannot go back to head, it's state is mutable. It any *invisible* invocation of 
{{getReader()}} happened, it will be very hard to track down the problem., such 
as SQOOP-1784.
2. The current code assumes the post data to be valid JSON object. Usually it'd 
be better wrapped into an object, such as "jsonObject", so that we can call 
{{ctx.getParameterValue("jsonObject")}}.

I'd provide a {{getRawPostData()}} so that callers can put finger away from 
{{getReader()}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to