sane-city / wot-servient

W3C Web of Things implementation for Java
MIT License
29 stars 5 forks source link

Unsupported media type #43

Open LeebPhil opened 3 years ago

LeebPhil commented 3 years ago

Hey guys,

I'm trying build a wot-directory and use Yasgui as SPARQL-frontend but when trying to send a http-request on my defined directory-endpoint i get a 415 unsupported media type response.
Is there any way to change my defined ThingAction accepting application/x-www-form-urlencoded, or is it just application/json?
i've already tried:

Operation operation = Operation.INVOKE_ACTION;
Form form = new Form.Builder()
    .setHref("[myHREF]")
    .setOp(operation)
    .setContentType("application/x-www-form-urlencoded")
    .build();

and call addForm in ThingAction.Builder

Kind regards
Phil

HeikoBornholdt commented 2 years ago

Hey,

Sorry for the late response.

To make sure I understand your problem: You want to access a thing exposed by the wot-servient from Yasgui? And Yasgui use the content type application/x-www-form-urlencoded?

LeebPhil commented 2 years ago

Hey,

Sorry for the late response.

To make sure I understand your problem: You want to access a thing exposed by the wot-servient from Yasgui? And Yasgui use the content type application/x-www-form-urlencoded?

Yes, Yasgui uses ‚application/x-www-form-urlencoded‘