Skip to content

Instantly share code, notes, and snippets.

@damoodamoo
Created March 11, 2020 11:09
Show Gist options
  • Save damoodamoo/965ad1febd473398acf7a9c748d62074 to your computer and use it in GitHub Desktop.
Save damoodamoo/965ad1febd473398acf7a9c748d62074 to your computer and use it in GitHub Desktop.
@PostMapping("/HttpTriggerWithOutputs")
public InvokeResponse HttpTriggerWithOutputs(){
InvokeResponse resp = new InvokeResponse();
resp.ReturnValue = "return val data here";
Map<String, Object> headers = new HashMap<String, Object>();
headers.put("header1", "header1Val");
headers.put("header2", "header2Val");
Map<String, Object> httpRes = new HashMap<String,Object>();
httpRes.put("statusCode", "201");
httpRes.put("body", "my world");
httpRes.put("headers", headers);
resp.Outputs.put("res", httpRes);
return resp;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment