[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [bridgedb/develop] Fix quoting in moat specification.



commit 8d8db4a06d3dff5e9f82adcb4e0e921fe3577098
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Wed Dec 13 18:18:55 2017 +0000

    Fix quoting in moat specification.
---
 README.rst | 74 +++++++++++++++++++++++++++++++-------------------------------
 1 file changed, 37 insertions(+), 37 deletions(-)

diff --git a/README.rst b/README.rst
index c2f32c1..8481382 100644
--- a/README.rst
+++ b/README.rst
@@ -429,10 +429,10 @@ Requesting Bridges
 The client MUST send a ``POST /meek/moat/fetch`` containing the following JSON::
 
     {
-      'data': {
-        'version': '0.1.0',
-        'type': 'client-transports',
-        'supported': [ 'TRANSPORT', 'TRANSPORT', ... ],
+      "data": {
+        "version": "0.1.0",
+        "type": "client-transports",
+        "supported": [ "TRANSPORT", "TRANSPORT", ... ],
       }
     }
 
@@ -456,10 +456,10 @@ If there is no overlap with the transports which BridgeDB supports, the moat
 server will respond with the list of transports which is *does* support::
 
     {
-      'data': {
-        'version': '0.1.0',
-        'type': 'moat-transports',
-        'supported': [ 'TRANSPORT', 'TRANSPORT', ... ],
+      "data": {
+        "version": "0.1.0",
+        "type": "moat-transports",
+        "supported": [ "TRANSPORT", "TRANSPORT", ... ],
       }
     }
 
@@ -468,13 +468,13 @@ the "best" transport from the list of supported transports, and respond with the
 following JSON containing a CAPTCHA challenge::
 
     {
-      'data': {
-        'id': 1,
-        'type': 'moat-challenge',
-        'version': '0.1.0',
-        'transport': TRANSPORT,
-        'image': CAPTCHA,
-        'challenge': CHALLENGE,
+      "data": {
+        "id": "1",
+        "type": "moat-challenge",
+        "version": "0.1.0",
+        "transport": "TRANSPORT",
+        "image": "CAPTCHA",
+        "challenge": "CHALLENGE",
       }
     }
 
@@ -498,14 +498,14 @@ To propose a solution to a CAPTCHA, the client MUST send a request for ``POST
 /meek/moat/check``, where the body of the request contains the following JSON::
 
     {
-      'data': {
-        'id': 2,
-        'type': 'moat-solution',
-        'version': '0.1.0',
-        'transport': TRANSPORT,
-        'challenge': CHALLENGE,
-        'solution': SOLUTION,
-        'qrcode': BOOLEAN,
+      "data": {
+        "id": "2",
+        "type": "moat-solution",
+        "version": "0.1.0",
+        "transport": "TRANSPORT",
+        "challenge": "CHALLENGE",
+        "solution": "SOLUTION",
+        "qrcode": "BOOLEAN",
       }
     }
 
@@ -518,8 +518,8 @@ where:
 * ``SOLUTION`` is a valid unicode string, up to 20 bytes in length,
   containing the client's answer (i.e. what characters the CAPTCHA
   image displayed).  The solution is *not* case-sensitive.
-* ``BOOLEAN`` is ``'true'`` if the client wants a qrcode containing the bridge
-  lines to be generated and returned; ``'false'`` otherwise.
+* ``BOOLEAN`` is ``"true"`` if the client wants a qrcode containing the bridge
+  lines to be generated and returned; ``"false"`` otherwise.
 
 
 Receiving Bridges
@@ -532,12 +532,12 @@ If the ``SOLUTION`` was successful for the supplied ``CHALLENGE``, the
 server responds ``200 OK`` with the following JSON::
 
     {
-      'data': {
-        'id': 3,
-        'type': 'moat-bridges',
-        'version': '0.1.0',
-        'bridges': [ 'BRIDGE_LINE', ... ],
-        'qrcode': QRCODE,
+      "data": {
+        "id": "3",
+        "type": "moat-bridges",
+        "version": "0.1.0",
+        "bridges": [ "BRIDGE_LINE", ... ],
+        "qrcode": "QRCODE",
       }
     }
 
@@ -556,12 +556,12 @@ server is unable to distribute the requested Bridges, the server responds ``200
 OK`` with the following JSON::
 
     {
-      'error': {
-        'id': 1,
-        'code': '404',
-        'status': 'Not Found',
-        'title': 'Could not fetch the type of bridges you requested',
-        'detail': DETAILS,
+      "error": {
+        "id": "1",
+        "code": "404",
+        "status": "Not Found",
+        "title": "Could not fetch the type of bridges you requested",
+        "detail": "DETAILS",
       }
     }
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits