Home Business & Finance Show HN: GET Together – A social network where you don't...
Business & Finance

Show HN: GET Together – A social network where you don't need POST to Post

Key Points

/ɡet təˈɡeðə/ verb - 1. To meet and spend time with other human beings. To write a post using the wrong HTTP method.

GET together. /ɡet təˈɡeðə/ verb - 1. To meet and spend time with other human beings. - 2. To write a post using the wrong HTTP method. A social network with no POSTs. Everything you write is a GET request. The posts are public, the newest ones come first, and that’s about it. How to post GET /postChange the name and text, then run an example below. A successful request returns the new post’s ID. curl -G 'https://gettogether.dev/post' \ --data-urlencode 'name=your_nickname' \ --data-urlencode 'text=hello everyone' from urllib.request import urlopen from urllib.parse import urlencode query = urlencode({"name": "your_nickname", "text": "hello everyone"}) with urlopen("https://gettogether.dev/post?" + query) as response: print(response.read().decode()) const query = new URLSearchParams({ name: 'your_nickname', text: 'hello everyone', }); const response = await fetch('https://gettogether.dev/post?' + query); console.log(await response.json()); package main import ("io"; "net/http"; "net/url"; "os") func main() { query := url.Values{ "name": {"your_nickname"}, "text": {"hello everyone"}, } res, err := http.Get("https://gettogether.dev/post?" + query.Encode()) if err != nil { panic(err) } defer res.Body.Close() if _, err := io.Copy(os.Stdout, res.Body); err != nil { panic(err) } } fn main() -> Result<(), Box> { let response = reqwest::blocking::Client::new() .get("https://gettogether.dev/post") .query(&[("name", "your_nickname"), ("text", "hello everyone")]) .send()?; println!("{}", response.text()?); Ok(()) } {"ok": true, "id": "…"} 200 OKNames, cookies & other details Names. 2–20 letters, numbers, or underscores. Names aren’t unique or verified. Cookies. Cookies are optional for posting. To delete a post later, keep the gt_session cookie returned by the server and send it with your next request. In cURL, add -b cookies.txt -c cookies.txt to save and reuse it. Keep that file private. Retries. The server creates an ID if you leave it out. For safe retries, send your own id UUID and reuse it with the same cookie. Requests without an ID create a new post each time. Endpoints. /post?name=alice&text=hello writes a post. /feed returns posts as JSON. /heart?id=…&on=1 adds a heart; use on=0 to remove it. /delete?id=… deletes your own post. All use GET. Replies. Add parent=POST_ID to /post to reply to a post. Open its replies to copy an example. /feed?parent=POST_ID returns its replies and the original post. Replies can have replies, and use the same limits and moderation checks. Deleting a post preserves other users’ replies. Moderation. New posts and names are checked for English profanity and crypto content. Crypto, Bitcoin, memecoins and token promotion are not allowed. Reports trigger an automated abuse review. Clear violations are hidden; reporting alone does not remove a post. Read the rules. Privacy. The post is public, and its text is part of the URL. Don’t include private information. - 400 - Check the name, text and UUID. - 403 - Check the owner cookie or request origin. - 429 - Wait ten seconds and retry.
POST (ORG) response.json (PERSON) OKNames (ORG) alice&text (PERSON) POST_ID (ORG) Bitcoin (ORG) UUID (ORG)
Originally published by Hacker News Read original →