Pregunta

I'm trying to use apache httpclient. I have a httppost query. To build my object I use the info provided by chrome developer tool. When I connect do the server I see a http post request and info under payload: 7|0|10|http://sfe.corpe15.com:8980/etrading/etrading/|0A6AA27FE80C74E3200C24AA537362BD|com.gwtplatform.dispatch.shared.DispatchService|execute|

How does that translate in Java? How do I send the payload in my httppost object?

Thanks!

¿Fue útil?

Solución

I figured it out! It looks like this!

String payLoadLogin = "blahblahblah"

HttpPost httppost = new HttpPost(postAddress);
httppost.setHeader("X-GWT-Permutation", "3DE824138FE65400740EC1816A73CACC");
httppost.setHeader("Content-Type", "text/x-gwt-rpc; charset=UTF-8");
StringEntity se = new StringEntity(payLoadLogin );      
httppost.setEntity(se);
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top