Request jsonlist instead of superlist
This commit is contained in:
parent
3bda68b466
commit
60a1dc7bf9
|
@ -55,12 +55,12 @@ def serve(recursive, filename):
|
||||||
|
|
||||||
@cli.command()
|
@cli.command()
|
||||||
@click.argument('host', default='127.0.0.1')
|
@click.argument('host', default='127.0.0.1')
|
||||||
def superlist(host):
|
def jsonlist(host):
|
||||||
"""Fetch superlist from HOST running SupberBeam.
|
"""Fetch jsonlist from HOST running SupberBeam.
|
||||||
|
|
||||||
HOST is the IP of the SuperBeam server.
|
HOST is the IP of the SuperBeam server.
|
||||||
"""
|
"""
|
||||||
with requests.get(f'http://{host}:8080/superlist',
|
with requests.get(f'http://{host}:8080/jsonlist',
|
||||||
headers={'User-Agent': 'sbeam'}) as response:
|
headers={'User-Agent': 'sbeam'}) as response:
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
return response.text.split('\n')
|
return response.text.split('\n')
|
||||||
|
|
Loading…
Reference in New Issue