Package play.libs.WS

Examples of play.libs.WS.WSRequest


      // cache hit
      Cache.replace(cacheKey, userPerms, "6mn")// keep cache warm
      return new JsonParser().parse(userPerms).getAsJsonObject();
    } else {
      // cache miss
      WSRequest req = WS.url(oauth.instance_url
          + "/services/data/v28.0/sobjects/%s/describe/", "PermissionSet");
      req.headers.put("Authorization", "OAuth " + oauth.access_token);
      HttpResponse response = req.get();
 
      int res = response.getStatus();
      if (res == 200) {
        JsonElement jsonResult = response.getJson();
        Cache.set(cacheKey, jsonResult.toString(), "6mn");
View Full Code Here

TOP

Related Classes of play.libs.WS.WSRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.