diff --git a/pom.xml b/pom.xml index 3230e0c..afc230e 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.skynet.api.framework.java skynet-api-framework-java - 1.0.123 + 1.0.124 diff --git a/src/main/java/api/service/Service.java b/src/main/java/api/service/Service.java index a9a9ce6..f488ef7 100644 --- a/src/main/java/api/service/Service.java +++ b/src/main/java/api/service/Service.java @@ -117,6 +117,16 @@ public Service pathParams(Map pathParams) { return this; } + public Service formParam(String key, String value) { + requestSpecBuilder.addFormParam(key, value); + return this; + } + + public Service formParams(Map formParams) { + requestSpecBuilder.addFormParams(formParams); + return this; + } + public Service body(Object body) { requestSpecBuilder.setBody(body); return this; @@ -142,6 +152,10 @@ public > Service get(Enum route, Map additi response = given().log().all().spec(requestSpecification).when().get().then().extract().response(); return this; } + + public > Service get(Enum route) throws Exception { + return this.get(route, null); + } @SafeVarargs public final > Service post(Enum route, Map additionalHeaders, Map... body) throws Exception {