I am trying to set some headers on a REST request and looking at the documentation it says that I can use the setHeader method to this. However when I run the workflow with this option set I get the following error.
Property or method 'setHeader' not found on object RESTRequest
Here is the code i am using
var PostResponse = BRHost.createRequest("POST", "/api/sessionMngr/?v=v1_1", null).execute(); var newPost = BRHost.createRequest("POST","/api/tenants"); newPost.contextType = "text/xml"; newPost.setHeader = ("Accept", "application/xml"); newPost.setHeader = ("Name", username); etc...
I am running version 1.0.6.2501990 of the rest plugin, if that makes a difference.