[Glass] REST and Post
Paul DeBruicker
pdebruic at gmail.com
Thu Jun 12 07:04:38 PDT 2014
Are you caching your routes? I'm not using the 'consumes' directive but
everything else in your method looks OK.
BrunoBB wrote
> Hi,
>
> I have some REST service working ok - all of them
> <get>
> services.
>
> Now i want to add a
> <post>
> service but is not being recognized.
>
> orbeonSecurityToken: uuidToken
>
> <get>
>
> <path: '/sendToken?token={1}'>
>
>
> <produces: 'text/xml'>
> | serviceRegistry serviceValue |
> serviceRegistry := OrbeonTempServiceRegistry default.
> serviceValue := serviceRegistry valueFor: uuidToken.
> serviceValue ifNil: [^self answerXMLErrorWith: uuidToken].
> serviceRegistry unregister: uuidToken. "the token is removed after used
> (for security reasons)"
> ^serviceValue
>
> This services is working ok, but the following NOT:
> newOrbeonForm
>
> <post>
>
> <consumes: '*/xml'>
>
> <path: '/newform'>
>
> OrbeonFormPostRegistry default register: self requestContext request
> rawBody.
> ^ 'OK'
>
> Here i get: /orbeon-api/newform not found from:
> http://myip:8888/orbeon-api/newform
>
> All services are under "/orbeon-api" and
> <get>
> services work very well.
>
> Any idea what is going on ? Can i use
> <path>
> pragma with
> <post>
> ?
>
> The code is almost the same as in seaside book.
> (i tested some other options in the post service but it is never called)
>
> Regards,
> Bruno
--
View this message in context: http://forum.world.st/REST-and-Post-tp4762802p4762812.html
Sent from the GLASS mailing list archive at Nabble.com.
More information about the Glass
mailing list