Example usage for com.google.gwt.http.client RequestBuilder PUT

List of usage examples for com.google.gwt.http.client RequestBuilder PUT

Introduction

In this page you can find the example usage for com.google.gwt.http.client RequestBuilder PUT.

Prototype

Method PUT

To view the source code for com.google.gwt.http.client RequestBuilder PUT.

Click Source Link

Document

Specifies that the HTTP PUT method should be used.

Usage

From source file:org.tiwonk.gwt.rest.generator.ClientResourceGenerator.java

License:Apache License

private void addMethodBody(GeneratorInfo info, SourceWriter writer, JMethod method)
        throws UnableToCompleteException {

    if (info.httpMethod == RequestBuilder.GET) {
        buildGetMethod(info, writer, method);
    } else if (info.httpMethod == RequestBuilder.POST) {
        buildPostMethod(info, writer, method);
    } else if (info.httpMethod == RequestBuilder.PUT) {
        buildPutMethod(info, writer, method);
    }/*from   ww w .  ja v  a 2s .c  om*/

}

From source file:org.tiwonk.gwt.rest.generator.ClientResourceGenerator.java

License:Apache License

private void analyzeHttpMethod(GeneratorInfo info, JMethod method) {

    Annotation[] annotations = method.getAnnotations();
    for (int i = 0; i < annotations.length; i++) {
        Annotation note = annotations[i];
        if (note.annotationType() == GET.class) {
            info.httpMethod = RequestBuilder.GET;
            return;
        } else if (note.annotationType() == POST.class) {
            info.httpMethod = RequestBuilder.POST;
            return;

        } else if (note.annotationType() == PUT.class) {
            info.httpMethod = RequestBuilder.PUT;
            return;
        }/*from   w ww. j  a va2  s  .  c  om*/
    }

}

From source file:org.turbogwt.net.http.client.RequestImpl.java

License:Apache License

@Override
public RequestPromise<Void> put() {
    return send(RequestBuilder.PUT, Void.class);
}

From source file:org.turbogwt.net.http.client.RequestImpl.java

License:Apache License

@Override
public <T> RequestPromise<T> put(Class<T> responseType) {
    return send(RequestBuilder.PUT, responseType);
}

From source file:org.turbogwt.net.http.client.RequestImpl.java

License:Apache License

@Override
public <T, C extends Collection> RequestPromise<Collection<T>> put(Class<T> responseType,
        Class<C> containerType) {
    return send(RequestBuilder.PUT, responseType, containerType);
}

From source file:pt.ist.processpedia.client.service.http.PutService.java

License:Open Source License

public PutService(String url) {
    super(RequestBuilder.PUT, url);
}

From source file:pt.ist.processpedia.client.service.http.PutService.java

License:Open Source License

public PutService(String url, Translator translator) {
    super(RequestBuilder.PUT, url, translator);
}

From source file:rtdc.web.client.impl.GwtHttpRequest.java

License:Open Source License

public GwtHttpRequest(String url, RequestMethod requestMethod) {
    RequestBuilder.Method method = null;
    switch (requestMethod) {
    case GET:/*from  w  w w .j  a  v a 2  s  . c o  m*/
        method = RequestBuilder.GET;
        break;
    case POST:
        method = RequestBuilder.POST;
        break;
    case PUT:
        method = RequestBuilder.PUT;
        break;
    case DELETE:
        method = RequestBuilder.DELETE;
        break;
    }
    builder = new RequestBuilder(method, url);
}