|
@@ -21,3 +21,29 @@ Sample output
|
|
|
{"error": "Invalid http method", "result": null}
|
|
|
```
|
|
|
|
|
|
+# Python version
|
|
|
+
|
|
|
+## Simplified call using sets
|
|
|
+```
|
|
|
+[jceresini@slartibartfast]$ curl -H "Content-type: text/plain" -d "@testfiles/doi.txt" http://test.ceresini.com:5000/contains_all_chars_a
|
|
|
+{"result": true, "error": null}
|
|
|
+
|
|
|
+[jceresini@slartibartfast]$ curl -H "Content-type: text/plain" -d "@testfiles/doi-no-z.txt" http://test.ceresini.com:5000/contains_all_chars_a
|
|
|
+{"result": false, "error": null}
|
|
|
+
|
|
|
+[jceresini@slartibartfast]$ curl -H "Content-type: text/plain" -d "@testfiles/doi-allcaps.txt" http://test.ceresini.com:5000/contains_all_chars_a
|
|
|
+{"result": false, "error": null}
|
|
|
+```
|
|
|
+
|
|
|
+
|
|
|
+## Slower call iterating over the input string
|
|
|
+```
|
|
|
+[jceresini@slartibartfast]$ curl -H "Content-type: text/plain" -d "@testfiles/doi.txt" http://test.ceresini.com:5000/contains_all_chars_b
|
|
|
+{"result": true, "error": null}
|
|
|
+
|
|
|
+[jceresini@slartibartfast]$ curl -H "Content-type: text/plain" -d "@testfiles/doi-no-z.txt" http://test.ceresini.com:5000/contains_all_chars_b
|
|
|
+{"result": false, "error": null}
|
|
|
+
|
|
|
+[jceresini@slartibartfast]$ curl -H "Content-type: text/plain" -d "@testfiles/doi-allcaps.txt" http://test.ceresini.com:5000/contains_all_chars_b
|
|
|
+{"result": false, "error": null}
|
|
|
+```
|