io.reinert.requestor.ext:requestor-turbogwt

Requesting made easy for GWT.

License

License

Categories

Categories

GWT (Google Web Toolkit) User Interface Web Frameworks
GroupId

GroupId

io.reinert.requestor.ext
ArtifactId

ArtifactId

requestor-turbogwt
Last Version

Last Version

0.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

Requesting made easy for GWT.

Download requestor-turbogwt

How to add to project

<!-- https://jarcasting.com/artifacts/io.reinert.requestor.ext/requestor-turbogwt/ -->
<dependency>
    <groupId>io.reinert.requestor.ext</groupId>
    <artifactId>requestor-turbogwt</artifactId>
    <version>0.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.reinert.requestor.ext/requestor-turbogwt/
implementation 'io.reinert.requestor.ext:requestor-turbogwt:0.2.0'
// https://jarcasting.com/artifacts/io.reinert.requestor.ext/requestor-turbogwt/
implementation ("io.reinert.requestor.ext:requestor-turbogwt:0.2.0")
'io.reinert.requestor.ext:requestor-turbogwt:jar:0.2.0'
<dependency org="io.reinert.requestor.ext" name="requestor-turbogwt" rev="0.2.0">
  <artifact name="requestor-turbogwt" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.reinert.requestor.ext', module='requestor-turbogwt', version='0.2.0')
)
libraryDependencies += "io.reinert.requestor.ext" % "requestor-turbogwt" % "0.2.0"
[io.reinert.requestor.ext/requestor-turbogwt "0.2.0"]

Dependencies

compile (1)

Group / Artifact Type Version
io.reinert.requestor.core : requestor-api jar 0.2.0

provided (3)

Group / Artifact Type Version
org.turbogwt.core : turbogwt-core jar 0.4.0
com.google.gwt : gwt-user jar 2.7.0
com.google.gwt : gwt-dev jar 2.7.0

test (1)

Group / Artifact Type Version
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

Requestor Build Status Gitter

A Modern HTTP Client API for GWT, Requestor offers all features needed for a current robust AJAX application. It is pleasant to use and fully configurable and extensible.

Preview

Requesting is now simple and nice.

requestor.req("http://httpbin.org/ip").get(String.class).done(new DoneCallback<String>() {
  public void onDone(String result) {
      Window.alert(result);
  }
});

With Java 8 support, it will be really cool!

requestor.req("http://httpbin.org/ip").get(String.class).done(Window::alert);

The low-level RequestBuilder way would be...

/* Original GWT RequestBuilder approach */
RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, "http://httpbin.org/ip");
rb.setCallback(new RequestCallback() {
    @Override
    public void onResponseReceived(Request request, Response response) {
        String result = response.getText();
        Window.alert(result);
    }

    @Override
    public void onError(Request request, Throwable exception) {
        // ...
    }
});
try {
    rb.send();
} catch (RequestException e) {
    // ...
}

Make a request is a trivial task and now you can do it healthily. :)
Requesting will never be boring again!

Features

  • Promises (integrate any promise library)
  • Fluent API
  • Full support to Form requests (urlencoded or multipart)
  • Full support to raw binary data (File, Blob, ArrayBuffer, Json, Document)
  • Progress monitoring of uploads and downloads
  • Uri Parsing
  • Uri Building
  • Basic and Digest authentication (nicely supporting CORS)
  • OAuth2
  • Extremely easy to implement any custom authentication
  • Headers API
  • Filters (enhance requests and responses)
  • Interceptors (transform payloads)
  • Auto JSON serialization for POJOs, JavaBean Interfaces and Overlay types
  • Integrated to the AutoBean Framework
  • Integrated to gwt-jackson
  • Integrated to TurboGWT
  • Handle multiple serialization of the same java type for different media types
  • Customizable request dispatching (support for caching and synchronization)

Browser Support

Almost all features are working perfectly in all modern browsers, except:

  • Binary data manipulation is not supported by IE9- and Opera Mini
  • CORS is poorly supported by IE9- and Opera Mini

Examples

Documentation

Community

Latest Release

0.2.0 (18 Feb 2015)

Installation

The minimal installation requires two dependencies, the core API and some implementation. The default implementation is requestor-gdeferred, which exposes GDeferred's Promise API.

<dependency>
    <groupId>io.reinert.gdeferred</groupId>
    <artifactId>gdeferred</artifactId>
    <version>0.9.0</version>
</dependency>
<dependency>
    <groupId>io.reinert.requestor.impl</groupId>
    <artifactId>requestor-gdeferred</artifactId>
    <version>0.2.0</version>
</dependency>
<dependency>
    <groupId>io.reinert.requestor.core</groupId>
    <artifactId>requestor-api</artifactId>
    <version>0.2.0</version>
</dependency>

To make requestor available to your GWT project, import the implementation's module.

<inherits name="io.reinert.requestor.RequestorByGDeferred"/>

Read the Getting Started wiki page for more information.

Using SNAPSHOT versions

If you want to use the latest snapshot, you need to add the sonatype snapshot repository to your POM.

<repositories>
  ...
  <repository>
    <id>oss-sonatype</id>
    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
  </repository>
  ...
</repositories>

License

Requestor is freely distributable under the Apache 2.0 License

Analytics

Versions

Version
0.2.0
0.1.0