def _post_resource(self, url, body):
params = {}<EOL>self._set_as_user(params)<EOL>headers = {'<STR_LIT:Content-Type>': '<STR_LIT:application/json>',<EOL>'<STR_LIT>': '<STR_LIT:application/json>',<EOL>'<STR_LIT>': '<STR_LIT>'}<EOL>url = url + self._params(params)<EOL>response = DAO.postURL(url, headers, json.dumps(body))<EOL>if not (response.status == <NUM_LIT:200> or response.status == <NUM_LIT>):<EOL><INDENT>raise DataFailureException(url, response.status, response.data)<EOL><DEDENT>return json.loads(response.data)<EOL>
Canvas POST method.