Message from @Undead Mockingbird
Discord ID: 508466473140879373
you have urls, you post json to those urls, shit happens
tl;dr version :^)
Let's say, a simple Facebook. Each user has a biography and about page.
i dont understand servers besides the basic concept of "send request, get data", so don't even try this lol
If you point your browser at an URL like https://www.yourfacebook.com/[user]/about, then, instead of the user portion referring to a directory on the web server, it will read it as a parameter to a function that gives you the user's about page.
it's the same shit, but without html
It then sends back the content of the about page for that user and that's the return value of your remote method call.
oh so like
wait
hol up
<https://github.com/vesdii/deduper>
it executes a function that takes `vesdii` as the first param and `deduper` as the second?
lol that's basically exactly what you said
i'm just fucking thick
i need some cbd oil
yup
Well, not that particular page. That is HTML, but a lot of content is basically just JSON and some JS on your web browser will put it in the right place on the web page. It's not necessarily static content anymore, like in the Web 1.0 days.
It's kind of like abusing the postal service. Let's say you invented a secret convention with a friend, according to which you don't send them any letter (the content) necessarily, but encode what he's supposed to do in the sender address (the URL).
wut
You write something on the envelope, and it will still be delivered, but your friend will take the street address to mean a password, for example.
this is too meta :^)
For example, a REST API could return 30 for https://api.adder.com/10/20
Let me give you another example. HOld on.
THIS ISNT HELPING JUST ***STOP***
github url is also a good example of that tho:^)
i stopped paying attention or caring after i started crying a few minutes ago so fugghetabahtit
just returns html template instead of json
pls don't cry
For example, enter this URL in your browser.
http://wttr.in/
lol not directly about this
and now run this from a terminal:
> curl https://wttr.in
i just cry randomly because i'm no longer able to hold down the deep fears and hatred of myself after a while
It will return the current weather for your location as text.
undead
hush
it's over
https://wttr.in/tehran will return weather for Tehran, Iran.
doesn't sound fun ;~;
Oh.
I thought we were having fun.
welp