Skip to content

Handle form content-type client side #854

@relu91

Description

@relu91

Hi all. I'm opening this issue as a consequence of the latest discussion during the TD/Protocol binding templates call. During the call, people complained about how node-wot clients (primarily HTTP and COAP) are ignoring the content-type field in forms. Sadly I couldn't find the minutes of the call so I'm trying to summarize by heart.

Looking at https://github.com/eclipse/thingweb.node-wot/blob/master/packages/binding-http/src/http-client-impl.ts, what I see, is that the content type is taken into account for every write operation (i.e., invokeaction and writeproperty), whereas is ignored in reading operations (node-wot uses what the server gives). Do people feel like that node-wot HTTP client should set the Accept header to the content-type value when reading? To me is quite redundant but it does not hurt that much. Do you have a compelling reason for doing so?

I know that the COAP discussion is more controversial due to mappings between coap-specific fields and WoT content-type, so I would leave it after we have a common take on HTTP.

pinging relevant people: @egekorkan @mkovatsc @danielpeintner @hidetak @JKRhb. If I recalled something wrong feel free to correct me, I'll update this first post accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Discuss in Committer MeetingLabels issues and PRs that should be discussed in our regular Thingweb Committer Meeting.binding-httpIssues related to http protocol bindinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions