Skip to content

Latest commit

 

History

History
70 lines (43 loc) · 1.87 KB

README.md

File metadata and controls

70 lines (43 loc) · 1.87 KB

Cazzy-Simple-Networking

Add repositories in build.gradle (Project:YOUR_APP_NAME)

repositories {
      jcenter()
      maven { url 'https://jitpack.io' }
  }

Add dependencies in build.gradle (Module:app)

dependencies {

//... other dependencies

compile 'com.github.bhavin250495:Cazzy-Simple-Networking:1.0'

}

Usage

HTTP GET REQUEST

   Http_request.sendGetRequest("url", new ResponseHandler() {
                              @Override
                              public void getResponse(ServerResponseWrapper serverResponseWrapper) {
                                  if (serverResponseWrapper.isSuccess){
                                      Log.d("TAG",serverResponseWrapper.response);
                                  }else{
                                      Log.d("TAG",serverResponseWrapper.response);
                                  }
                              }
                          });

HTTP POST REQUEST

   Http_request.sendPostRequest("url", JsonParam.toString(), new ResponseHandler() {
                              @Override
                              public void getResponse(ServerResponseWrapper serverResponseWrapper) {
                                  if (serverResponseWrapper.isSuccess){
                                      Log.d("TAG",serverResponseWrapper.response);
                                  }else{
                                      Log.d("TAG",serverResponseWrapper.response);
                                  }
                              }
                          });