Package com.google.gwt.gadgets.client.io

Examples of com.google.gwt.gadgets.client.io.RequestOptions


    url += "?nocache=" + Math.random();
    if (userId != null) {
      url += "&userId=" + userId;
    }

    RequestOptions opts = RequestOptions.newInstance().setAuthorizationType(
        AuthorizationType.SIGNED);
    io.makeRequestAsJso(url, callback, opts);
  }
View Full Code Here


    io.makeRequestAsJso(url, callback, opts);
  }

  public void saveLocation(Location location,
      ResponseReceivedHandler<Object> callback) {
    RequestOptions params = RequestOptions.newInstance();
    params.setMethodType(MethodType.POST).setPostData(io.encodeValues(location));
    params.setAuthorizationType(AuthorizationType.SIGNED);
    io.makeRequest(servletUrl, callback, params);
  }
View Full Code Here

  }

  public void deleteLocation(Location location,
      ResponseReceivedHandler<Object> callback) {
    String url = servletUrl + "?key=" + location.getKey();
    RequestOptions params = RequestOptions.newInstance();
    params.setMethodType(MethodType.DELETE).setAuthorizationType(
        AuthorizationType.SIGNED);
    io.makeRequest(url, callback, params);
  }
View Full Code Here

  public GadgetsRequest sendRequest(String requestData, RequestCallback callback) {
    return doSend(requestData, callback);
  }

  private GadgetsRequest doSend(String requestData, final RequestCallback callback) {
    final RequestOptions options =
        requestOptions != null ? requestOptions : RequestOptions.newInstance();
    options.setMethodType(MethodType.POST);
    options.setPostData(requestData);

    final GadgetsRequest gadgetsRequest = new GadgetsRequest(getTimeoutMillis(), callback);
    gadgetsRequest.setPending(true);

    IoProvider.get().makeRequest(getUrl(), new ResponseReceivedHandler<Object>() {
View Full Code Here

     
      inProcess  = true;
      //contactsList.clear();
     
      String url = "http://www.google.com/m8/feeds/contacts/default/full?alt=json&max-results=10000";
      final RequestOptions options = RequestOptions.newInstance();
      options.setAuthorizationType(AuthorizationType.OAUTH);
      options.setContentType(ContentType.JSON);
      options.setMethodType(MethodType.GET);
           
      GadgetsIo  gIO = IoProvider.get();
     
      gIO.makeRequestAsJso(url, new ResponseReceivedHandler<JsArray<JavaScriptObject>>() {
            @Override
View Full Code Here

TOP

Related Classes of com.google.gwt.gadgets.client.io.RequestOptions

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.