We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2d7833 commit fdb491eCopy full SHA for fdb491e
packages/td-tools/src/thing-description.ts
@@ -56,7 +56,7 @@ export type ThingInteraction = TDT.PropertyElement | TDT.ActionElement | TDT.Eve
56
export class Form implements TDT.FormElementBase {
57
op?: string | string[];
58
href: TDT.AnyUri;
59
- contentType?: string;
+ contentType: string;
60
contentCoding?: string;
61
subprotocol?: TDT.Subprotocol;
62
security?: TDT.Security;
@@ -67,7 +67,7 @@ export class Form implements TDT.FormElementBase {
67
68
constructor(href: string, contentType?: string) {
69
this.href = href;
70
- if (contentType != null) this.contentType = contentType;
+ this.contentType = contentType ?? "application/json";
71
}
72
73
export interface ExpectedResponse {
0 commit comments