Last active
May 9, 2019 02:35
-
-
Save Anakin-Hao/1ae50da9656db55f16a3238156f16914 to your computer and use it in GitHub Desktop.
Test infinispan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from requests.auth import HTTPBasicAuth | |
import time | |
headers = {'Content-Type': 'application/json', 'performAsync': 'True', 'timeToLiveSeconds': '99999999999'} | |
body = {'test':123} | |
auth=HTTPBasicAuth('test', 'changeme') | |
baseurl = "http://infinispan-server-http/rest" | |
def run(): | |
global headers | |
global body | |
global auth | |
while True: | |
r = requests.get(f"{baseurl}/default/test", auth=auth, headers=headers, data=body, verify=False) | |
print(r) | |
print(r.json()) | |
print(time.time()) | |
time.sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment