mirror of
https://github.com/versia-pub/docs.git
synced 2025-12-06 14:28:20 +01:00
refactor: 📝 Use new Versia content-type everywhere
Some checks failed
Mirror to Codeberg / Mirror (push) Failing after 0s
Some checks failed
Mirror to Codeberg / Mirror (push) Failing after 0s
This commit is contained in:
parent
e138e9e7c3
commit
c6c5945bef
|
|
@ -37,7 +37,7 @@ export const metadata = {
|
||||||
|
|
||||||
```http {{ 'title': 'Example response' }}
|
```http {{ 'title': 'Example response' }}
|
||||||
HTTP/1.1 200 OK
|
HTTP/1.1 200 OK
|
||||||
Content-Type: application/vnd.versia+json
|
Content-Type: application/vnd.versia+json; charset=utf-8
|
||||||
|
|
||||||
{
|
{
|
||||||
"type": "InstanceMetadata",
|
"type": "InstanceMetadata",
|
||||||
|
|
@ -81,7 +81,7 @@ export const metadata = {
|
||||||
|
|
||||||
```http {{ 'title': 'Example response' }}
|
```http {{ 'title': 'Example response' }}
|
||||||
HTTP/1.1 200 OK
|
HTTP/1.1 200 OK
|
||||||
Content-Type: application/vnd.versia+json
|
Content-Type: application/vnd.versia+json; charset=utf-8
|
||||||
|
|
||||||
{
|
{
|
||||||
"type": "User",
|
"type": "User",
|
||||||
|
|
@ -125,7 +125,7 @@ export const metadata = {
|
||||||
|
|
||||||
```http {{ 'title': 'Example response' }}
|
```http {{ 'title': 'Example response' }}
|
||||||
HTTP/1.1 200 OK
|
HTTP/1.1 200 OK
|
||||||
Content-Type: application/vnd.versia+json
|
Content-Type: application/vnd.versia+json; charset=utf-8
|
||||||
|
|
||||||
{
|
{
|
||||||
"type": "Followers",
|
"type": "Followers",
|
||||||
|
|
@ -173,7 +173,7 @@ The delivery mechanism is described further in the [Federation](/federation) doc
|
||||||
POST /.versia/v0.6/inbox
|
POST /.versia/v0.6/inbox
|
||||||
Host: b.social
|
Host: b.social
|
||||||
Accept: application/vnd.versia+json
|
Accept: application/vnd.versia+json
|
||||||
Content-Type: application/vnd.versia+json
|
Content-Type: application/vnd.versia+json; charset=utf-8
|
||||||
|
|
||||||
{
|
{
|
||||||
"type": "Note",
|
"type": "Note",
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ Accept: application/jrd+json
|
||||||
{
|
{
|
||||||
"subject": "acct:george@versia.social", // [!code focus:6]
|
"subject": "acct:george@versia.social", // [!code focus:6]
|
||||||
"aliases": [
|
"aliases": [
|
||||||
"https://versia.social/users/018ec082-0ae1-761c-b2c5-22275a611771",
|
"https://versia.social/.versia/v0.6/entities/User/018ec082-0ae1-761c-b2c5-22275a611771",
|
||||||
"https://versia.social/@george"
|
"https://versia.social/@george"
|
||||||
],
|
],
|
||||||
"links": [
|
"links": [
|
||||||
|
|
@ -35,8 +35,8 @@ Accept: application/jrd+json
|
||||||
},
|
},
|
||||||
{ // [!code focus:5]
|
{ // [!code focus:5]
|
||||||
"rel": "self",
|
"rel": "self",
|
||||||
"type": "application/json",
|
"type": "application/vnd.versia+json",
|
||||||
"href": "https://versia.social/users/018ec082-0ae1-761c-b2c5-22275a611771"
|
"href": "https://versia.social/.versia/v0.6/entities/User/018ec082-0ae1-761c-b2c5-22275a611771"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"rel": "http://webfinger.net/rel/avatar",
|
"rel": "http://webfinger.net/rel/avatar",
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ const headers = new Headers();
|
||||||
headers.set("Versia-Signed-By", "bob.com");
|
headers.set("Versia-Signed-By", "bob.com");
|
||||||
headers.set("Versia-Signed-At", timestamp);
|
headers.set("Versia-Signed-At", timestamp);
|
||||||
headers.set("Versia-Signature", base64Signature);
|
headers.set("Versia-Signature", base64Signature);
|
||||||
headers.set("Content-Type", "application/json");
|
headers.set("Content-Type", "application/vnd.versia+json; charset=utf-8");
|
||||||
|
|
||||||
const response = await fetch("https://alice.com/.versia/v0.6/inbox", {
|
const response = await fetch("https://alice.com/.versia/v0.6/inbox", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue