Skip to content

Commit b92b627

Browse files
author
Nuno Loureiro
authored
Replaced extra host with variable
1 parent 2ff645e commit b92b627

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

probely_api_examples/add_hosts_to_target.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
token = input("API Token: ")
99
target_id = input("Target ID: ")
10+
host = 'api.example.com'
1011

1112
headers = {
1213
'Authorization': "JWT {}".format(token),
@@ -18,7 +19,7 @@
1819
response = requests.post(
1920
endpoint.format(target_id=target_id),
2021
headers=headers,
21-
json={'host': 'example.com'})
22+
json={'host': host})
2223

2324
print(response.request.headers)
2425

0 commit comments

Comments
 (0)