kobolog / gorb

IPVS on steroids – REST API, heartbeats, service discovery and more
GNU Lesser General Public License v3.0
809 stars 83 forks source link

simple example trouble #11

Closed anapsix closed 8 years ago

anapsix commented 8 years ago

started GORB on veles, doing a simple service creation with PUT from volos fails with an error having hard time seeing mistake in data payload.

anapsix@volos:~$ curl -sS -H "Content-Type: application/json" \
  -X PUT \
  --data-binary '{"host":"10.20.0.100","port":"8080","protocol":"tcp","method":"rr","persitent":false}'  \
  veles:4672/service/test \
  | json_pp 
{
   "error" : "json: cannot unmarshal string into Go value of type uint16"
}

:sob: please advise..

kobolog commented 8 years ago

In request JSON object, "port" should be a number, not string. On Пт, 4 дек. 2015 г. at 15:19 Anastas Dancha notifications@github.com wrote:

started GORB on veles, doing a simple service creation with PUT from volos fails with an error having hard time seeing mistake in data payload.

anapsix@volos:~$ curl -sS -H "Content-Type: application/json" \ -X PUT \ --data-binary '{"host":"10.20.0.100","port":"8080","protocol":"tcp","method":"rr","persitent":false}' \ veles:4672/service/test \ | json_pp { "error" : "json: cannot unmarshal string into Go value of type uint16" }

— Reply to this email directly or view it on GitHub https://github.com/kobolog/gorb/issues/11.

anapsix commented 8 years ago

D'oh! :pensive: :gun: