0
我在我的構建路徑上有jersey-client-2.25.1,我知道它有默認提供程序來轉換javax.ws.rs.core。申請表格/ x-www-form-urlencoded。身體作家未找到窗體和應用程序/ x-www-form-urlencoded
但此代碼:
private ClientResponse getResponse(Authorization authInstance, Form formData) {
return webResourceInstance.type(MediaType.APPLICATION_FORM_URLENCODED).
header("Authorization",encode(authInstance)).
post(ClientResponse.class, formData);
}
我不斷收到:
com.sun.jersey.api.client.ClientHandlerException: com.sun.jersey.api.client.ClientHandlerException: A message body writer for Java type, class javax.ws.rs.core.Form, and MIME media type, application/x-www-form-urlencoded, was not found
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:155)
我不應該註冊一個多類按this。