def jsonp_wrap(callback_key='<STR_LIT>'):
def decorator_fn(f):<EOL><INDENT>@wraps(f)<EOL>def jsonp_output_decorator(*args, **kwargs):<EOL><INDENT>task_data = _get_data_from_args(args)<EOL>data = task_data.get_data()<EOL>if callback_key not in data:<EOL><INDENT>raise KeyError(<EOL>'<STR_LIT>'.format(<EOL>callback_key))<EOL><DEDENT>callback = data[callback_key]<EOL>jsonp = f(*args, **kwargs)<EOL>if isinstance(JobContext.get_current_context(), WebJobContext):<EOL><INDENT>JobContext.get_current_context().add_responder(<EOL>MimeSetterWebTaskResponder('<STR_LIT>'))<EOL><DEDENT>jsonp = "<STR_LIT>".format(callback=callback, data=jsonp)<EOL>return jsonp<EOL><DEDENT>return jsonp_output_decorator<EOL><DEDENT>return decorator_fn<EOL>
Format response to jsonp and add a callback to JSON data - a jsonp request