Created
July 9, 2019 08:50
-
-
Save mahbub-shohag/4288dbdee2d39b944c6e0ea02403e0bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add plugin in dependency plugin : compile "org.grails.plugins:rest-client-builder:2.1.1" | |
def sms(){ | |
def rest = new RestBuilder() | |
MultiValueMap<String, String> form = new LinkedMultiValueMap<String, String>() | |
form.add("UserID", "****") | |
form.add("Passwor", "******") | |
form.add("stuID", "*******") | |
def resp = rest.post("http://localhost:8087/bankapi/student/CheckId") { | |
accept JSONObject, 'application/json' | |
contentType("application/x-www-form-urlencoded") | |
body(form) | |
} | |
def json = resp.json | |
System.out.println(json) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment