Skip to content

Commit

Permalink
fix content type for requests and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
ashutshkumr committed Jan 29, 2021
1 parent 9afe598 commit aacd1bf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ ts = api.transmit_state()
ts.state = ts.START
api.set_transmit_state(ts)
# wait for flow metrics to be as expected
metrics = lambda: api.get_flow_metrics(api.flow_metrics_request())
while not all([m.frames_tx == 10000 == m.frames_rx for m in metrics()]):
continue
while True:
metrics = api.get_flow_metrics(api.flow_metrics_request())
if all([m.frames_tx == 10000 == m.frames_rx for m in metrics]):
break
```
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.23
0.1.24
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
'typing'
],
extras_require={
'ixnetwork': ['snappi_ixnetwork>=0.1.4']
'ixnetwork': ['snappi_ixnetwork>=0.1.5']
},
tests_require=['pytest']
)
3 changes: 2 additions & 1 deletion snappi/snappicommon.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def send_recv(self, method, relative_url, payload=None, return_object=None):
url=url,
data=data,
verify=False,
allow_redirects=True
allow_redirects=True,
headers={'Content-Type': 'application/json'}
)
if response.ok:
if response.headers['content-type'] == 'application/json':
Expand Down

0 comments on commit aacd1bf

Please sign in to comment.