Пример #1
0
 private void request(int position) {
   Request<Bitmap> request = null;
   switch (position) {
     case 0:
       request = NoHttp.createImageRequest(Constants.URL_NOHTTP_IMAGE);
       break;
     case 1:
       request = NoHttp.createImageRequest(Constants.URL_NOHTTP_IMAGE, RequestMethod.POST);
       break;
     case 2:
       request = NoHttp.createImageRequest(Constants.URL_NOHTTP_IMAGE, RequestMethod.PUT);
       break;
     case 3:
       request = NoHttp.createImageRequest(Constants.URL_NOHTTP_IMAGE, RequestMethod.HEAD);
       break;
     case 4:
       request = NoHttp.createImageRequest(Constants.URL_NOHTTP_IMAGE, RequestMethod.DELETE);
       break;
     case 5:
       request = NoHttp.createImageRequest(Constants.URL_NOHTTP_IMAGE, RequestMethod.OPTIONS);
       break;
     case 6:
       request = NoHttp.createImageRequest(Constants.URL_NOHTTP_IMAGE, RequestMethod.TRACE);
       break;
     case 7:
       request = NoHttp.createImageRequest(Constants.URL_NOHTTP_IMAGE, RequestMethod.PATCH);
       break;
     default:
       break;
   }
   if (request != null) CallServer.getRequestInstance().add(this, 0, request, this, false, true);
 }
Пример #2
0
 private void StringRequest() {
   String url = "";
   Request<String> request = NoHttp.createStringRequest(url, RequestMethod.POST);
 }
Пример #3
0
 public static DownloadQueue getDownloadInstance() {
   if (downloadQueue == null)
     downloadQueue = NoHttp.newDownloadQueue(SampleApplication.getInstance());
   return downloadQueue;
 }
Пример #4
0
 private CallServer() {
   requestQueue = NoHttp.newRequestQueue(SampleApplication.getInstance());
 }