LP#1612771: update protocol documentation
authorGalen Charlton <gmc@esilibrary.com>
Tue, 1 Nov 2016 20:03:50 +0000 (16:03 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 1 Nov 2016 21:13:35 +0000 (17:13 -0400)
Now that we have PARTIAL and NOCONTENT statuses, let's
mention them in the documentation for the benefit of
folks writing future clients.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
doc/OpenSRF-Messaging-Protocol.html

index 1eeff04..590f136 100644 (file)
@@ -38,7 +38,9 @@
                <b> <pre style="border: solid thin blue; margin: 2% 10% 2% 10%; padding-left: 50px">
                100     STATUS_CONTINUE
                200     STATUS_OK       
+               204     STATUS_NOCONTENT
                205     STATUS_COMPLETE
+               206     STATUS_PARTIAL
                307     STATUS_REDIRECTED
                400     STATUS_BADREQUEST
                404     STATUS_NOTFOUND
@@ -137,7 +139,13 @@ while ( more requests ) {
                                the request is now complete, nothing more to be done with this request
                                break out of loop
        
-               if ( response.typ == RESULT )
+               if ( response.type == RESULT )
+
+                       if    ( response.statusCode == STATUS_PARTIAL )
+                               add response chunk to buffer
+                               continue receiving response chunks
+                       elsif ( response.statusCode == STATUS_NOCONTENT )
+                               have whole response, use buffer as result
 
                        pass result to the application layer for processing