Back to project page visiting-card-android.
The source code is released under:
GNU General Public License
If you think the Android project visiting-card-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.matrix.visitingcard.http; //from ww w . j av a 2s. c om import com.matrix.asynchttplibrary.AsyncH; public class AsyncHttp extends AsyncH { private static AsyncHttp instance = null; protected AsyncHttp() { } public synchronized static AsyncHttp getInstance() { if (instance == null) { instance = new AsyncHttp(); instance.addHeader("Content-Type", "application/json"); instance.addHeader("Accept", "application/vnd.visiting-card+json;version=1"); } return instance; } public static AsyncHttp getNewInstance() { AsyncHttp newInstance = new AsyncHttp(); newInstance.addHeader("Content-Type", "application/json"); newInstance.addHeader("Accept", "application/vnd.visiting-card+json;version=1"); return newInstance; } public static AsyncHttp getStrippedInstance() { AsyncHttp newInstance = new AsyncHttp(); newInstance.addHeader("Accept", "application/vnd.visiting-card+json;version=1"); return newInstance; } }