Merge pull request #1124 from mfietz/issue/1122

gpodder.net: POST empty string instead of null
This commit is contained in:
Tom Hennen 2015-08-22 19:54:03 -04:00
commit 7fb75cad75
1 changed files with 2 additions and 17 deletions

View File

@ -1,8 +1,5 @@
package de.danoeh.antennapod.core.gpoddernet;
import android.os.Build;
import android.util.Log;
import com.squareup.okhttp.Credentials;
import com.squareup.okhttp.MediaType;
import com.squareup.okhttp.OkHttpClient;
@ -25,23 +22,10 @@ import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.security.KeyStore;
import java.security.Principal;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory;
import javax.net.ssl.X509TrustManager;
import javax.security.auth.x500.X500Principal;
import de.danoeh.antennapod.core.ClientConfig;
import de.danoeh.antennapod.core.gpoddernet.model.GpodnetDevice;
@ -562,7 +546,8 @@ public class GpodnetService {
e.printStackTrace();
throw new GpodnetServiceException(e);
}
Request.Builder request = new Request.Builder().url(url).post(null);
RequestBody body = RequestBody.create(TEXT, "");
Request.Builder request = new Request.Builder().url(url).post(body);
executeRequestWithAuthentication(request, username, password);
}