loopj

Loopj messing special characters before sending them through a request

こ雲淡風輕ζ 提交于 2019-12-01 13:55:34
I'm trying to send special characters through an http request, now I'm using Loopj as my http client. The problem is that when I try to send special characters i.e. "áéíóú" the request goes out with the characters "·ÈÌÛ˙", this is causing some issues on the server sider. I've gone through the Loopj code and couldn't find anything relative to recoding my string or anything like it. In the worst case it seems like it would be encoded in UTF-8 which actually supports this characters. Hope anyone can help. Best Regards. I am guessing you mean AsyncHttpClient library, correct? AHC defaults to

Android - loopJ AsyncHttpClient return response onFinish or onSuccess

非 Y 不嫁゛ 提交于 2019-11-29 02:46:31
I am looking for a way to return the response I get in loopJ AsyncHttpClient onFinish or onSuccess or onFailure. As of now I have this piece of code: **jsonParse.java file** public class jsonParse { static JSONObject jObj = null; static String jsonString = ""; AsyncHttpClient client; public JSONObject getJSONObj() { RequestParams params; params = new RequestParams(); params.add("username", "user"); params.add("password", "password"); client = new AsyncHttpClient(); client.post("http://example.com", params, new TextHttpResponseHandler() { @Override public void onSuccess(int i, Header[] headers,

Android Studio: Resolving Duplicate Classes

…衆ロ難τιáo~ 提交于 2019-11-28 10:14:35
When I try to run my android application on an Android device, the gradle console reports the following error: Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/loopj/android/http/AsyncHttpClient$1.class When I search for the "AsyncHttpClient" class, I see that it's indeed being found in two separate locations: /Users/Afflatus/.gradle/caches/modules-2/files-2.1/com.loopj.android/android-async-http/1.4.9/5d171c3cd5343e5997f974561abed21442273fd1/android-async-http-1

Android - loopJ AsyncHttpClient return response onFinish or onSuccess

蓝咒 提交于 2019-11-27 21:59:46
问题 I am looking for a way to return the response I get in loopJ AsyncHttpClient onFinish or onSuccess or onFailure. As of now I have this piece of code: **jsonParse.java file** public class jsonParse { static JSONObject jObj = null; static String jsonString = ""; AsyncHttpClient client; public JSONObject getJSONObj() { RequestParams params; params = new RequestParams(); params.add("username", "user"); params.add("password", "password"); client = new AsyncHttpClient(); client.post("http://example

POSTing JSON/XML using android-async-http (loopj)

Deadly 提交于 2019-11-27 10:34:05
I am using android-async-http and really liking it. I've run into a problem with POSTing data. I have to post data to the API in the following format: - <request> <notes>Test api support</notes> <hours>3</hours> <project_id type="integer">3</project_id> <task_id type="integer">14</task_id> <spent_at type="date">Tue, 17 Oct 2006</spent_at> </request> As per the documentation, I tried doing it using RequestParams , but it is failing. Is this any other way to do it? I can POST equivalent JSON too. Any ideas? Timothy Loopj POST examples - extended from their Twitter example: private static

Android Studio: Resolving Duplicate Classes

社会主义新天地 提交于 2019-11-27 03:27:35
问题 When I try to run my android application on an Android device, the gradle console reports the following error: Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/loopj/android/http/AsyncHttpClient$1.class When I search for the "AsyncHttpClient" class, I see that it's indeed being found in two separate locations: /Users/Afflatus/.gradle/caches/modules-2/files-2.1

POSTing JSON/XML using android-async-http (loopj)

可紊 提交于 2019-11-26 17:57:18
问题 I am using android-async-http and really liking it. I've run into a problem with POSTing data. I have to post data to the API in the following format: - <request> <notes>Test api support</notes> <hours>3</hours> <project_id type="integer">3</project_id> <task_id type="integer">14</task_id> <spent_at type="date">Tue, 17 Oct 2006</spent_at> </request> As per the documentation, I tried doing it using RequestParams , but it is failing. Is this any other way to do it? I can POST equivalent JSON