Re: HTTP Response Codes - Just for clarity

On 10/11/14 21:26, James Graham wrote:
> On 10/11/14 18:38, Jason Leyba wrote:
>> Oops, hit send.
>>
>> GET /session/{sessionId}/element/{__ELEMENT}/attribute/{name}
>>    200 if command finished; response has {"value": X} (X may be null)
>>    404 if {sessionId} or {ELEMENT} not valid references
>>
>> POST /session/{sessionId}/element/{______ELEMENT}/attribute/{name}
>>    405: valid command URL, but invalid method
>>
>> POST /session/{sessionId}/element/
>>    200 {"status": "success", "value": {ELEMENT}}
>>    200 {"status": "no such element", "value": error-details}
>>    404: {sessionId} not found
> 
> I think there was some agreement to remove status: from the response
> body and use the code to communicate success vs failure. For non-success
> responses the body would look like {"error": "reason for error"}

Er, sorry, thinking about it it must have been no "status" for success,
but "status" for failure to provide a standard failure code (above and
beyond the http code) and some other field to have a human readable
message (I don't recall what this was going to be called though).

Received on Monday, 10 November 2014 22:46:54 UTC