-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xml or json - use one format passing to sense-o #35
Comments
@juztas Can you elaborate? If this is a bug report, what are the steps / input to reproduce? |
I see this from the sense-rtmon issue: esnet/sense-rtmon#127 (comment). But it remains unclear what was the input to the API call. |
@xi-yang We have discussed this here: https://stackv.slack.com/archives/CFSBT7TFC/p1718389638923429 Issue is on sense-o-py-client. To repeat issue (it happens sometimes):
From Chat, Alberto said:
So client - should say it is xml and not json (or we should migrate calls to json format on the client) |
I see few issues here:
|
Accepting XML content with JSON header is possibly environmental. But the code is indeed flawed. sense-o-py-client/sense/client/apiclient.py Lines 38 to 41 in 19ddaa2
There should be an option (xml or json with default to json) in the request calls. |
I patched up the API client with both The manifest POST will use XML content and accept JSON return. The change is in PyPi now. Try the latest sense-o-api==1.35. |
That was still an issue. Fix is here: #37 We need to set headers before issuing post/get/put call. |
As reported by Sunami and seen in the past, it all starts from here: https://github.com/sdn-sense/sense-o-py-client/blob/main/sense/client/workflow_combined_api.py#L674 (wrapping json inside xml). Need to rewrite to use in either xml or json
The text was updated successfully, but these errors were encountered: