GIOMIKY: Pres dev tools jsem zmanipulovat firefox aby poslal dotaz na api (api akceptuje i id_user / session cookies, proto tam nemam ty auth veci) a tohle funguje (par veci jsem teda vyhodil, ale v principu by tohle melo byt ok):
Jinak pro jistotu zkus vzdy poslat neco v message, nejsem si jisty, jestli to api nepozaduje...ale myslim, ze tohle jsem opravoval.
POST /api.php HTTP/1.1
Host: www.nyx.cz
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Referer:
https://www.nyx.cz/
Content-Type: multipart/form-data; boundary=---------------------------2947931362286975723942639516
Content-Length: 2353
Origin:
https://www.nyx.cz
DNT: 1
Connection: keep-alive
Cookie: cookie_consent=1; last_port_add=455; ssl=1; id_user=1; session=XXX
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
A body pak je:
-----------------------------2947931362286975723942639516
Content-Disposition: form-data; name="id"
22326
-----------------------------2947931362286975723942639516
Content-Disposition: form-data; name="message"
test
-----------------------------2947931362286975723942639516
Content-Disposition: form-data; name="attachment"; filename="test.txt"
Content-Type: text/plain
Oh, hi!
-----------------------------2947931362286975723942639516
Content-Disposition: form-data; name="l"
discussion
-----------------------------2947931362286975723942639516
Content-Disposition: form-data; name="l2"
send
-----------------------------2947931362286975723942639516--