kfcr is an easily customisable chat server that uses HTTP requests in order to communicate.
to verify a url is indeed, a KFCR server, send a GET request to "url/KFCR_verification"
this will return a 200 if it's a kfcr server, it will most likely be a 404 elsewhere. to be extra sure, it also returns the text "KFCR verified!"
each message is a JSON object consisting of four keys
{
"id": "(integer) the messages unique identifier.",
"user": "(string) the username of the sender",
"content": "(string) the message text",
"timestamp": "(integer) time server received and processed message in milliseconds since Unix epoch",
"sys": "(boolean) if message was generated by KFCR or not."
}
to call for the latest x
messages. make a GET request to "url/messages/last/x"
to call for the every message ever sent since x
(unix timestamp in ms), make a GET request to "url/messages/since/x"
to call for every message since the id x
, make a GET request to "url.messages/sinceid/x"
to POST a message successfully, you must make a POST request to "url/messages/post", and send a JSON object with two keys, "user", and "content" "user" is the username to be stored, and "content" is the text of the message. ex:
{
"user": "jimbob",
"content": "foo"
}
any extra data will be stripped/overridden. (ex: adding "sys": true
will get overridden to "sys": false
, or adding "evil extra hidden payload" : ">:)"
will be stripped and deleted)
there are no sockets in KFCR. good luck ;)
to get the full version id, send a GET request to "url/version"
to get the release channel of the KFCR instance on the server, send a GET request to "url/version/release". this should return text that is either "A", alpha, "B", beta, "S", stable, or "D", deprecated.
to get the version number of the KFCR instance, send a GET request to "url/version/number".
to get the branch that the chat server is running on, send a GET request to url/version/branch
this is all to it. good luck ;)