Over a million developers have joined DZone.

HTTP-RPC 4.0 Released

DZone's Guide to

HTTP-RPC 4.0 Released

HTTP-RPC is the cornerstone of many a web-based Java application. Come check out what's new with the latest major release, HTTP-RPC 4.0 and see where you can get your hands on it.

· Web Dev Zone ·
Free Resource

Jumpstart your Angular applications with Indigo.Design, a unified platform for visual design, UX prototyping, code generation, and app development.

HTTP-RPC 4.0 is now available for download. This release adds support for application/x-www-form-urlencoded and application/json request encodings. In addition to submitting request arguments as multipart/form-data, client applications can now POST arguments as URL-encoded key/value pairs and POST or PUT argument values as JSON.

For example, the following Java code would submit a JSON-encoded POST request to the resource located at /example:


serviceProxy.invoke("POST", "/example", mapOf(
    entry("string", "hello"),
    entry("number", 123),
    entry("flag", true)), (result, exception) -> {
    // ...

In Swift, the code might look like this:

serviceProxy.encoding = WSApplicationJSON

serviceProxy.invoke("POST", path: "/example", arguments: [
    "string": "hello",
    "number": 123,
    "flag": true
    ]) { result, error in
    // ...

In either case, the body of the request would contain the following:

  "string": "hello",
  "number": 123,
  "flag": true

For more information, see the project README.

Take a look at an Indigo.Design sample application to learn more about how apps are created with design to code software.

release ,project ,http-rpc ,major ,java

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}