trying to add post params to http request but failing on 14 versions. 15 versions working properly
Hello,
I am trying to create a post request from a plugin I am writing and it is working in 15 intellij version but does not work on 14 version:
UrlEncodedFormEntity ent = new UrlEncodedFormEntity(formParams);
((HttpPost) request).setEntity(ent);
when I look at the request /entity objects I can't see my parameter.
I have tried adding it in this form :
basicParams.setBooleanParameter("ship_it" , true);
((HttpPost) request).setParams(basicParams);
request.setHeader("ship_it" , "true");
but still no go.
any tip on how I can complete it and why intellij 15 version is working properly?
请先登录再写评论。
Maybe it's related to the version of HttpClient library shipped with IDEA. You can probably try to bundle your own version with your plugin not to depend on it.
Hello,
I was mistaken , this doesn't work on intellij 15 as well.
I don't know if doesn't work since I did it in wrong way or this behavior is normal.