Response Status Codes for Orbeon REST API Get Requests

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Response Status Codes for Orbeon REST API Get Requests

Graham May-2
Hi, recently I have been calling the Orbeon REST API via a servlet (I have already setup Orbeon-Auth). I was retrieving published form definitions via a REST API call such as:
GET http://localhost:8084/orbeon/fr/service/persistence/crud/<application-name>/<form-name>/form/form.xhtml HTTP/1.1

I have noticed that if I mistakenly passed in a URL for a resource that does not exist (an unknown form or application) I always got back a 200 response with no content. Where as I would anticipate that it would be more appropriate to return 404 resource not found. Is a 200 response expected in this scenario?

For clarification I am using orbeon-4.1.0.201304182144-PE.

Many thanks
Graham

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Response Status Codes for Orbeon REST API Get Requests

Alessandro  Vernet
Administrator
Hi Graham,

You're right: the service should respond with a 404. In fact, we have a issue for this:

https://github.com/orbeon/orbeon-forms/issues/771

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet