Skip to content

Commit 77839bf

Browse files
committed
update files example
1 parent 42153d3 commit 77839bf

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

examples/multiple_files.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@
1717
shell2http = Shell2HTTP(base_url_prefix="/cmd/")
1818
shell2http.init_app(app, executor)
1919

20-
ENDPOINT = "catthisformeplease"
21-
22-
shell2http.register_command(endpoint=ENDPOINT, command_name="strings")
20+
shell2http.register_command(endpoint="strings", command_name="strings")
2321

2422

23+
# go to http://localhost:4000/ to execute
2524
@app.route("/")
2625
def test():
2726
"""
@@ -32,7 +31,7 @@ def test():
3231
$ strings /tmp/inputfile /tmp/someotherfile
3332
```
3433
"""
35-
url = f"http://localhost:4000/cmd/{ENDPOINT}"
34+
url = "http://localhost:4000/cmd/strings"
3635
# create and read dummy data from temporary files
3736
with tempfile.TemporaryFile() as fp:
3837
fp.write(b"Hello world!")

0 commit comments

Comments
 (0)