Nexmo / comms-router

A server which allows you to route tasks to agents.
Apache License 2.0
21 stars 11 forks source link

error setting agent address to mobile number #91

Closed weihongchua closed 6 years ago

weihongchua commented 6 years ago

When setting the agent address to mobile number, encounter the following error: [note: real number is manually masked from the log]

curl -X PUT http://localhost:8080/comms-router-web/api/routers/my-router/agents/esagent1 -H 'Content-Type:application/json' -d'{"address”:”xxxxxxxxx”,”capabilities":{"language":["en","es"]}}' Unrecognized field "address”:”xxxxxxxxx”,”capabilities" (class com.softavail.commsrouter.api.dto.arg.CreateAgentArg), not marked as ignorable (2 known properties: "address", "capabilities"]) at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@251f1384; line: 1, column: 50] (through reference chain: com.softavail.commsrouter.api.dto.arg.CreateAgentArg["address”:”xxxxxxxxx”,”capabilities"]

angel-popov commented 6 years ago

Looks like double quotes are not from ascii table. This one works curl -X PUT http://localhost:8080/comms-router-web/api/routers/router/agents/esagent1 -H 'Content-Type:application/json' -d'{"address":"xxxxxxxxx","capabilities":{"language":["en","es"]}}'