Browse Source

XMLRPCClient: Add FIXME comment.

pull/350/head
Felipe Barriga Richards 8 years ago
parent
commit
4a9a8b6027
  1. 6
      app/src/main/java/de/timroes/axmlrpc/XMLRPCClient.java

6
app/src/main/java/de/timroes/axmlrpc/XMLRPCClient.java

@ -9,6 +9,7 @@ import java.util.concurrent.ConcurrentHashMap;
import org.apache.http.HttpResponse; import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.params.ClientPNames;
import org.apache.http.entity.StringEntity; import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.protocol.HTTP; import org.apache.http.protocol.HTTP;
@ -356,7 +357,7 @@ public class XMLRPCClient {
* Read the README file delivered with the source code of this library for more * Read the README file delivered with the source code of this library for more
* information. * information.
* *
* @param method A method name to call. * @param methodName A method name to call.
* @param params An array of parameters for the method. * @param params An array of parameters for the method.
* @return The result of the server. * @return The result of the server.
* @throws XMLRPCException Will be thrown if an error occurred during the call. * @throws XMLRPCException Will be thrown if an error occurred during the call.
@ -369,8 +370,9 @@ public class XMLRPCClient {
Call c = createCall(methodName, params); Call c = createCall(methodName, params);
// Prepare POST request // Prepare POST request
// FIXME: where creating a new HttpPost so calling #cancel isn't going to do anything
HttpPost post = new HttpPost(url); HttpPost post = new HttpPost(url);
post.getParams().setParameter("http.protocol.handle-redirects", false); post.getParams().setParameter(ClientPNames.HANDLE_REDIRECTS, false);
post.setHeader(CONTENT_TYPE, TYPE_XML); post.setHeader(CONTENT_TYPE, TYPE_XML);
StringEntity entity = new StringEntity(c.getXML(), HTTP.UTF_8); StringEntity entity = new StringEntity(c.getXML(), HTTP.UTF_8);
entity.setContentType(TYPE_XML); entity.setContentType(TYPE_XML);

Loading…
Cancel
Save