rx java - Convert Spring HttpEntity code to RxClient -


i have following code works spring.

import org.springframework.http.httpentity; import org.springframework.http.httpheaders; import org.glassfish.jersey.client.rx.rxclient;  httpentity req=new httpentity(jsoncontent, new httpheaders()); 

i wanted refactor part of code use rxclient tried following code has no luck working.

private rxclient<rxobservableinvoker> httpclient; @inject   public emprxclient(rxclient<rxobservableinvoker> httpclient) {     this.httpclient = httpclient;   }  rxwebtarget<rxobservableinvoker> rxwebtarget = httpclient.target(url);  if (jsoncontent != null)       rxinvocationbuilder = rxwebtarget.request(jsoncontent);     else       rxinvocationbuilder = rxwebtarget.request(); 

i received http error 411. request must chunked or have content length.


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -