Hello Dojo,
We are trying to receive information through an API that returns a JSON. However, even though we can see the data in Wireshark, the DataMiner streamviewer returns an empty value. Additionally, when we send the data to the parameter ID, we see that the parameter is also blank.
Wireshark:
Stream Viewer:
We are trying to catch the response using:
<Response statusCode="502">
<Content pid="302"></Content>
</Response>
Are we missing something here?
Thanks!!
Edit:
José, I've tried before with application/json as Content-type with the same result. I've also try to add some other headers, delete them, try combinations...
Complete session:
<Session id="2" name="HTTP_REQUEST_GetStreams" loginMethod="credentials" userName="username" password="password">
<Connection id="1">
<Request verb="GET" url="/zixi/streams.json">
<Headers>
<Header key="Authorization">credentials</Header>
<Header key="User-Agent">DataMiner</Header>
<Header key="Accept">*/*</Header>
<Header key="Accept-Encoding">gzip, deflate, br</Header>
<Header key="Connection">keep-alive</Header>
<Header key="Content-Type">application/json</Header>
</Headers>
</Request>
<Response statusCode="502">
<Content pid="302"></Content>
</Response>
</Connection>
</Session>
Hi Pedro,
Could you share the full session details with us?
Also, have you tried adding the following as a header?
<Header key="Content-Type">application/json</Header>
Kind regards,
The XML content in the “Add a Comment” box will always be truncated due to a known issue.
Could you please update your initial question to include this information?
Thanks in advance
Kind regards,
Hi José, done!
Hi José, I’ve tried to configure multiple times the headers, incluiding the one you mentioned. Here is the complete session:
credentials
DataMiner
*/*
gzip, deflate, br
keep-alive
application/json
Thanks!