Hi,
I am newbie in B4I and need to use Rest API for Negotiate with Server,
I Use Postman to getting code for that and get this code snippets in java OK Http format :
''''''''''''''''''''''''''''''''''''''''''
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "PhoneNumber=xxxxxxxxxxx");
Request request = new Request.Builder()
.url("http://192.1.101.14:1588/api/accounts/Login")
.post(body)
.addHeader("content-type", "application/x-www-form-urlencoded")
.addHeader("cache-control", "no-cache")
.addHeader("postman-token", "83e1fa87-2e58-b63b-272b-5051ab8eb827")
.build();
Response response = client.newCall(request).execute();
'''''''''''''''''''''''''''''''''''''''''
Please Help me to use it in B4I?
Please excuse me for bad english.
I am newbie in B4I and need to use Rest API for Negotiate with Server,
I Use Postman to getting code for that and get this code snippets in java OK Http format :
''''''''''''''''''''''''''''''''''''''''''
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "PhoneNumber=xxxxxxxxxxx");
Request request = new Request.Builder()
.url("http://192.1.101.14:1588/api/accounts/Login")
.post(body)
.addHeader("content-type", "application/x-www-form-urlencoded")
.addHeader("cache-control", "no-cache")
.addHeader("postman-token", "83e1fa87-2e58-b63b-272b-5051ab8eb827")
.build();
Response response = client.newCall(request).execute();
'''''''''''''''''''''''''''''''''''''''''
Please Help me to use it in B4I?
Please excuse me for bad english.