Skip to content

Commit

Permalink
add RequestParamsType enum and update RequestParams
Browse files Browse the repository at this point in the history
Handle Row Body ,FormData ,Form urlEncoded ,Binary
  • Loading branch information
alishatergholi committed Oct 27, 2018
1 parent 9ef8eaa commit c13522a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gradle
}
dependencies {
implementation 'com.github.alishatergholi:restclient:v1.0.4'
implementation 'com.github.alishatergholi:restclient:v1.0.5'
}
```

Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/ir/vasl/restclient/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import ir.vasl.library.enums.AuthType;
import ir.vasl.library.enums.EncodingType;

import ir.vasl.library.enums.RequestBodyType;
import ir.vasl.library.response.ResponseJsonHandler;
import ir.vasl.library.response.ResponseTextHandler;
import ir.vasl.library.utils.RequestParams;
Expand All @@ -34,7 +35,7 @@ protected void onCreate(Bundle savedInstanceState) {

findViewById(R.id.text).setOnClickListener(view -> {

RequestParams params = new RequestParams();
RequestParams params = new RequestParams(RequestBodyType.FormData);
params.put("page", "1");
restClient.POST("http://sandbox.vaslapp.com/api/v1/content/category/list",
"",
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ allprojects {
targetSdkVersion = 28
compileSdkVersion = 28
buildToolsVersion = '28.0.3'
versionCode = 4
versionName = "1.0.4"
versionCode = 5
versionName = "1.0.5"
}
}

Expand Down
1 change: 0 additions & 1 deletion library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ android {
versionCode 3
versionName "1.0.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}

buildTypes {
Expand Down

0 comments on commit c13522a

Please sign in to comment.