Skip to content

Add non-http "method": "post" LDO example #282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 46 additions & 1 deletion jsonschema-hyperschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -918,9 +918,54 @@ GET /foo/
]]>
</artwork>
</figure>

</t>
<t>
If the method is "post", "application/json" is the default media type.
</t>
<t>
As noted under <xref target="method">method</xref>, these fields
are not restricted to HTTP URIs.

<figure>
<preamble>
For example, this link indicates that if you want to
send an email to the author of the context resource,
your client needs to ask for both a plain text
and an HTML representation.
</preamble>
<artwork>
<![CDATA[{
"links": [{
"encType": "multipart/alternative; boundary=abc123",
"method": "post",
"rel": "author",
"href": "mailto:[email protected]{?subject}",
"hrefSchema": {
"type": "object",
"properties": {
"subject": { "type": "string" }
},
"required": ["subject"]
},
"schema": {
"type": "array",
"items": [
{
"type": "string",
"media": { "type": "text/plain; charset=utf8" }
},
{
"type": "string",
"media": { "type": "text/html" }
}
],
"minItems": 2
}
}]
}]]>
</artwork>
</figure>
</t>
</section>

<section title="schema" anchor="schema">
Expand Down