Closed mkrebs81 closed 5 months ago
@mkrebs81: I will have a look at theRestApiDeviceTest
and try to fix it.
@mkrebs81 Ifixed the unit-test. Shall I push here? -> Arnd can approve...
@ergo-furrer thank you; yes please push into this branch so Arnd can approve.
@mkrebs81: My test with the real Clemap device does not work anymore. I will have a look at it.
@ergo-furrer hmm, maybe I unintentionally changed the path from /digitaltwins/
to /digitaltwins
.
Can you check if the missing ending slash in the path is the problem?
@ergo-furrer hmm, maybe I unintentionally changed the path from
/digitaltwins/
to/digitaltwins
. Can you check if the missing ending slash in the path is the problem?
Thanks for the suggestion. The authentication fails. It seems to be an issue with the content-type. I will come back if I got it solved...
@ergo-furrer hmm, maybe I unintentionally changed the path from
/digitaltwins/
to/digitaltwins
. Can you check if the missing ending slash in the path is the problem?Thanks for the suggestion. The authentication fails. It seems to be an issue with the content-type. I will come back if I got it solved...
I fixed the SGr_02_0018_CLEMAP_EIcloudEnergyMonitor_V1.0.0.xml
EI-XML within SGrSpecificaitons.
Content-Type: application/json
header to the BearerToken / authentication request.inline
URL parameter sensor_id
into a <requestQuery>
element.Will do a PR on SGrSpecifications
@ergo-furrer you can commit to my PR which I created today
@ergo-furrer you can commit to my PR which I created today
Arnd asked me to check whether there is a way to stay backwards compatible with EI-XML so that we still can both /digitaltwins/?sensor_id={{sensor_id}}
and
<requestPath>/digitaltwins</requestPath>
<requestQuery>
<parameter>
<name>sensor_id</name>
<value>{{sensor_id}}</value>
</parameter>
</requestQuery>
@mkrebs81 Regading backwards compatibility:
The only solution I can think of, is to check if there is a <requestQuery>
there. If there it is not, then we do not apply URL-encoding. What do you think?
@ergo-furrer I committed an update which should allow backwards compatibility.
@ergo-furrer I committed an update which should allow backwards compatibility.
Thanks, this works fine!
I added a unit-test that tests the REST-API with form-data with my most recent commit.
Support for HTTP POST requests with form data (content type = application/x-www-form-urlencoded).
Separates request query and form parameters from request path or body (with EID specification changes).
This should also solve potential URL encoding problems.