wiki_links_test.py 499 B

1234567
  1. import requests, urllib3
  2. urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  3. base_url = 'https://192.168.130.161/taiga/api/v1'
  4. auth = requests.post(f'{base_url}/auth', json={'type': 'normal', 'username': 'FrancoisLange', 'password': 'BTSai123'}, verify=False).json()
  5. headers = {'Authorization': f'Bearer {auth["auth_token"]}', 'Content-Type': 'application/json'}
  6. res = requests.get(f'{base_url}/wiki-links?project=21', headers=headers, verify=False)
  7. print(res.status_code, res.text)