HTTP Trigger (Raw) - Example Needed

Jason Killelea

Is there any example of the HTTP Trigger Universal Function using the Raw Template? I have a POST which works perfectly in Postman but I can't figure out how to translate that into the raw JSON needed by the Universal Function. Any working example should help me connect the dots.

 

Thanks in advance.

Comments

1 comment

  • Comment author
    Jason Killelea
    • Edited

    Through a bunch of trial and error, I determined that the HTTP Trigger Raw template only allows you to enter Body data in your POST (no other methods are supported). The format is simply:

    {
      "key1": "value1",
      "key2": "value2",
      "key3": "$[$4.0.0]"
    }
     
    As far as I can tell, there is no way to pass Headers or Parameters. There is also no way to process the response. You either get a nondescript error or no visual feedback of any kind.
     
    Despite these limitations, I have been able to leverage this B1UP feature to POST some B1 order data to a web service and then open a browser to allow the user to interact with the newly uploaded data. Pretty cool.
     
    NOTE: Dynamic syntax must be wrapped in quotes!
    0

Please sign in to leave a comment.