René Cordier created JAMES-3094:
-----------------------------------

             Summary: Implement echo method
                 Key: JAMES-3094
                 URL: https://issues.apache.org/jira/browse/JAMES-3094
             Project: James Server
          Issue Type: Improvement
            Reporter: René Cordier


https://jmap.io/spec-core.html#the-coreecho-method

In order to test that our infrastructure is correct for the new `jmap` package, 
you will need to implement a simple echo method that returns exactly the same 
arguments as it is given.

Request: 
{code:java}
{
  "using": [ "urn:ietf:params:jmap:core"],
  "methodCalls": [
    [ "Core/echo", {
      "hello": true,
      "high": 5
    }, "b3ff" ]
  ]
}
{code}



Response: 
{code:java}
{
  "methodResponses": [
    [ "Core/echo", {
      "hello": true,
      "high": 5
    }, "b3ff" ]
  ],
  "sessionState": "75128aab4b1b"
}
{code}

*DoD*: serving the echo method and add memory integration tests. 

We need to be careful also about the way we parse JSON for the echo method to 
not have potential attacks, and can write some tests about it as well (have a 
look at https://github.com/nst/JSONTestSuite for example).
You can investigate as well if it's possible to get a lazy json parsing with 
`JsonTransformers` of the `play-json` library.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to