Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

Unable to use setHeader on REST request.

$
0
0

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.


Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>