Skip to content

Commit

Permalink
update files example
Browse files Browse the repository at this point in the history
  • Loading branch information
eshaan7 committed Nov 20, 2020
1 parent 42153d3 commit 77839bf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions examples/multiple_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
shell2http = Shell2HTTP(base_url_prefix="/cmd/")
shell2http.init_app(app, executor)

ENDPOINT = "catthisformeplease"

shell2http.register_command(endpoint=ENDPOINT, command_name="strings")
shell2http.register_command(endpoint="strings", command_name="strings")


# go to http://localhost:4000/ to execute
@app.route("/")
def test():
"""
Expand All @@ -32,7 +31,7 @@ def test():
$ strings /tmp/inputfile /tmp/someotherfile
```
"""
url = f"http://localhost:4000/cmd/{ENDPOINT}"
url = "http://localhost:4000/cmd/strings"
# create and read dummy data from temporary files
with tempfile.TemporaryFile() as fp:
fp.write(b"Hello world!")
Expand Down

0 comments on commit 77839bf

Please sign in to comment.