1234567891011121314151617181920212223242526272829 |
- #!/bin/sh
- readonly TARGET_INBOX_URL=localhost:8000/forge-fed/alice@example.net/inbox/
- read -r -d '' BOGUS_AP_NOTE <<-'BOGUSAPNOTE'
- {
- "@context" : "https://www.w3.org/ns/activitystreams" ,
- "attributedTo" : "charlie@example.net" ,
- "cc" : [ "alice@example.net/followers" ] ,
- "content" : "<p>Hello Note</p>" ,
- "id" : "0123456789ABCDEF" ,
- "published" : "2019-03-08T21:09:14Z" ,
- "sensitive" : "False" ,
- "source" : { "mediaType" : "text/plain", "content": "Hello Note" } ,
- "tag" : [] ,
- "to" : [ "alice@example.net" ] ,
- "type" : "Note" ,
- "url" : "https://example.net:5000/charlie@example.net/note/0123456789ABCDEF"
- }
- BOGUSAPNOTE
- curl -w "%{http_code}\\n" \
- -H "Content-Type: application/activity+json" \
- -H "Accept: application/json" \
- -X POST --data "$BOGUS_AP_NOTE" $TARGET_INBOX_URL
|