... | ... | @@ -63,30 +63,31 @@ Delight will take care of object serialization out-of-the-box |
|
|
|
|
|
### Pure HTTP Requests
|
|
|
|
|
|
Methods can be accessed through this pattern
|
|
|
You don't have to use the Java client. Any web-client can call server methods.
|
|
|
Methods can be accessed through this pattern:
|
|
|
|
|
|
WEB-CONTEXT/{handlerName}/{methodName}?parameter1=value1¶meterN=valueN...
|
|
|
|
|
|
Parameters are passed as JSON objects or literals: In our example a call would look like this:
|
|
|
|
|
|
GET http://localhost:8080/my-service/handler-x/doSometing?parameter=great
|
|
|
GET http://localhost:8080/my-service/handler-x/method-y?parameter=great
|
|
|
|
|
|
The following capabilities exist:
|
|
|
|
|
|
* __Primitive types__ (numbers, strings and boolean) will be transported as-is (simple strings)
|
|
|
|
|
|
GET http://localhost:8080/my-service/handler-x?simple=a%20string
|
|
|
GET http://localhost:8080/my-service/handler-x?simple=a%20string%20with%20saces
|
|
|
GET http://localhost:8080/my-service/handler-x/method-y?simple=a%20string
|
|
|
GET http://localhost:8080/my-service/handler-x/method-y?simple=a%20string%20with%20saces
|
|
|
|
|
|
* __Complex types__ will be converted into JSON representation
|
|
|
|
|
|
GET http://localhost:8080/my-service/handler-x?complexPar={"number":23,"string":"hello"}
|
|
|
GET http://localhost:8080/my-service/handler-x/method-y?complexPar={"number":23,"string":"hello"}
|
|
|
|
|
|
* __Arrays of primitive and complex types__ are permitted
|
|
|
|
|
|
* __null String values__ are represented with the zero byte (ASCII 0 / NUL). Specify it with URL encoding: '?parameterNull=%00'
|
|
|
|
|
|
GET http://localhost:8080/my-service/handler-x?parameterNull=%00
|
|
|
GET http://localhost:8080/my-service/handler-x/method-y?parameterNull=%00
|
|
|
|
|
|
* __POST or GET__ is possible to make the call
|
|
|
|
... | ... | |