Package play.libs.ws

Examples of play.libs.ws.WSResponse


  }

  private String getRequestToken(final Request request) throws AuthException {
    final Configuration c = getConfiguration();
    final List<NameValuePair> params = getRequestTokenParams(request, c);
    final WSResponse r = WS.url(c.getString(SettingKeys.REQUEST_TOKEN_URL))
        .setHeader("Content-Type", "application/json")
        .setHeader("X-Accept", "application/json")
        .post(encodeParamsAsJson(params)).get(getTimeout());

    if (r.getStatus() >= 400) {
      throw new AuthException(r.asJson().asText());
    } else {
      return r.asJson().get(PocketConstants.CODE).asText();
    }
  }
View Full Code Here

TOP

Related Classes of play.libs.ws.WSResponse

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.