Well, now it works. :)
Now I'm using this below, (like on bonita post), but after this I do a
UrlEncode, define a Parameter, and do the request.
//trying by constructing a XML similar to form mode of
Advanced Rest Client
body = "variables=<map>";
//24/5/2012 - defining the variables passed by arg
if (nomeVariavel1.Length != 0 && valorVariavel1.Length !=
0)
{
xmlaux = "<entry><string>" + nomeVariavel1 + "</
string><string>" + valorVariavel1 + "</string></entry>";
body = body + xmlaux;
}
//24/5/2012 - defining the variables passed by arg
if (nomeVariavel2.Length != 0 && valorVariavel2.Length !=
0)
{
xmlaux = "<entry><string>" + nomeVariavel2 + "</
string><string>" + valorVariavel2 + "</string></entry>";
body = body + xmlaux;
}
body = body + "</map>";
aux = HttpUtility.UrlEncode(body);//added: using
System.Web;
request.AddParameter("variables", aux);//IT WORKS!!!!!
//var response = new RestSharp.RestResponse();
IRestResponse response;
try
{
response = client.Execute(request);
.......
After this checking the generated Process Instance in User Experience
has the values are there.
Notes:
Changed the RestSharp dll from 102.7 to 103.1.
Had to change the Target Framework to support System.Web reference.
Maybe this can help someone. :)
Bonita and RestSharp FTW! :D
Makrea
On May 25, 12:51 pm, Makrea <
agut...@gmail.com> wrote:
> Short story:
> I can make a HTTP request to Bonita Open Solution REST API with
> success using Advanced Rest Client of Google Chrome and can't do the
> same using RestSharp.
>
> Long story (all the code is there):
> I posted my issue on the Bonita forum.
http://www.bonitasoft.org/forum/viewtopic.php?pid=39108#p39108