You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a very simple TD and tried to updated it using the PATCH endpoint, but no matter the payload that I added in the PATCH request the server replied was { "type": "/errors/types/bad-request", "title": "Bad Request", "status": 400 }
For reference, the created TD was { "@context": "https://www.w3.org/2019/wot/td/v1", "title": "testTD", "securityDefinitions": { "basic_sc": { "scheme": "basic", "in": "header" } }, "security": "basic_sc" } and the executed PATCH request was curl --request PATCH \ --url http://localhost:3000/things/urn:uuid:1459b300-5388-4dcc-a802-90ebbf1e7e6e \ --header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjksImlhdCI6MTY1OTEwNDM4MywiZXhwIjoxNjU5MTA1MjgzfQ.S7x7_ACToNa_caVE11asTts4xjgwZoQbMupI93FeUrI' \ --header 'content-type: application/json' \ --data '{"@context": "https://www.w3.org/2019/wot/td/v1","title": "update testTD","securityDefinitions": {"basic_sc": {"scheme": "basic","in": "header"}},"security": "basic_sc"}'
The text was updated successfully, but these errors were encountered:
The specs says to use application/merge-patch+json as content type. Any other type of content type results in a Bad Request. Therefore, this is the correct behavior. Please check the latest version and re-open if you are still experiences issues
I created a very simple TD and tried to updated it using the PATCH endpoint, but no matter the payload that I added in the PATCH request the server replied was
{ "type": "/errors/types/bad-request", "title": "Bad Request", "status": 400 }
For reference, the created TD was
{ "@context": "https://www.w3.org/2019/wot/td/v1", "title": "testTD", "securityDefinitions": { "basic_sc": { "scheme": "basic", "in": "header" } }, "security": "basic_sc" }
and the executed PATCH request wascurl --request PATCH \ --url http://localhost:3000/things/urn:uuid:1459b300-5388-4dcc-a802-90ebbf1e7e6e \ --header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjksImlhdCI6MTY1OTEwNDM4MywiZXhwIjoxNjU5MTA1MjgzfQ.S7x7_ACToNa_caVE11asTts4xjgwZoQbMupI93FeUrI' \ --header 'content-type: application/json' \ --data '{"@context": "https://www.w3.org/2019/wot/td/v1","title": "update testTD","securityDefinitions": {"basic_sc": {"scheme": "basic","in": "header"}},"security": "basic_sc"}'
The text was updated successfully, but these errors were encountered: