curl --data "PHPSESSID=<тут айди>" <тут юрл>
curl -X 'POST' -H "accept: application/json, text/plain, */*" -H "content-type: application/json;charset=UTF-8" --data '{"LoginForm":{"id_city":null,"username":"user","password":"pass"}}' "https://omni.top-academy.ru/auth/login" > data.json
можешь помочь пофиксить? отправляет мне обратно Bad Request * Trying 46.148.233.24:443...
* Connected to omni.top-academy.ru (46.148.233.24) port 443 (#0)
* schannel: disabled automatic use of client certificate
* schannel: ALPN, offering http/1.1
* schannel: ALPN, server accepted to use http/1.1
> 'POST' /auth/login HTTP/1.1
> Host: omni.top-academy.ru
> User-Agent: curl/7.79.1
> accept:application/json,text/plain,*/*
> content-type:application/json;charset=UTF-8
> Content-Length: 56
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 400 Bad Request
< Server: nginx/1.18.0
< Date: Fri, 01 Jul 2022 08:46:58 GMT
< Content-Type: text/html
< Content-Length: 157
< Connection: close
<
<html>
<head><title>400 Bad Request</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.18.0</center>
</body>
</html>
* Closing connection 0
* schannel: shutting down SSL/TLS connection with omni.top-academy.ru port 443
* Trying 46.148.233.24...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x55f87601ab50)
* Connected to omni.top-academy.ru (46.148.233.24) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use h2
* Server certificate:
* subject: C=RU; ST=Moscow; L=Moscow; O=ANO DPO AKADEMIYA SHAG; CN=*.top-academy.ru
* start date: Mar 11 10:50:30 2022 GMT
* expire date: Apr 12 10:50:29 2023 GMT
* subjectAltName: host "omni.top-academy.ru" matched cert's "*.top-academy.ru"
* issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign RSA OV SSL CA 2018
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x55f87601ab50)
> POST /auth/login HTTP/2
> Host: omni.top-academy.ru
> User-Agent: curl/7.64.0
> accept: application/json, text/plain, */*
> content-type: application/json;charset=UTF-8
> Content-Length: 66
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
* We are completely uploaded and fine
< HTTP/2 200
< server: nginx/1.18.0
< date: Fri, 01 Jul 2022 09:59:17 GMT
< content-type: application/json; charset=UTF-8
< content-length: 41
< set-cookie: PHPSESSID=dec361ad01bafe134e0f845c4ba75c05; path=/; HttpOnly
< expires: Thu, 19 Nov 1981 08:52:00 GMT
< cache-control: no-store, no-cache, must-revalidate
< pragma: no-cache
< x-content-type-options: nosniff
<
* Connection #0 to host omni.top-academy.ru left intact
{"error":{"username":["User not found"]}}
curl -V
curl 7.64.0 (x86_64-pc-linux-gnu) libcurl/7.64.0 OpenSSL/1.1.1i zlib/1.2.11 libidn2/2.2.0 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
Release-Date: 2019-02-06
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL
* Trying 46.148.233.24:443...
* Connected to omni.top-academy.ru (46.148.233.24) port 443 (#0)
* schannel: disabled automatic use of client certificate
* schannel: ALPN, offering http/1.1
* schannel: ALPN, server accepted to use http/1.1
> POST /auth/login HTTP/1.1
> Host: omni.top-academy.ru
> User-Agent: curl/7.79.1
> Accept: application/json, text/plain, */*
> Content-type: application/json;charset=UTF-8
> Content-Length: 56
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 400 Bad Request
< Server: nginx/1.18.0
< Date: Fri, 01 Jul 2022 10:15:30 GMT
< Content-Type: application/json; charset=UTF-8
< Content-Length: 104
< Connection: keep-alive
< Set-Cookie: PHPSESSID=6139f3111473c2238f89b9ea18cd5d2a; path=/; HttpOnly
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate
< Pragma: no-cache
<
{"name":"Bad Request","message":"Invalid JSON data in request body: Syntax error","code":0,"status":400}* Connection #0 to host omni.top-academy.ru left intact
@iMedved2009, curl -H "Accept: application/json, text/plain, */*" -H "Content-type: application/json;charset=UTF-8" --data-raw '{"LoginForm":{"id_city":null,"username":"user","password":"pass"}}' "https://omni.top-academy.ru/auth/login" -v
* Trying 46.148.233.24:443...
* Connected to omni.top-academy.ru (46.148.233.24) port 443 (#0)
* schannel: disabled automatic use of client certificate
* schannel: ALPN, offering http/1.1
* schannel: ALPN, server accepted to use http/1.1
> POST /auth/login HTTP/1.1
> Host: omni.top-academy.ru
> User-Agent: curl/7.79.1
> Accept: application/json, text/plain, */*
> Content-type: application/json;charset=UTF-8
> Content-Length: 56
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 400 Bad Request
< Server: nginx/1.18.0
< Date: Fri, 01 Jul 2022 10:24:58 GMT
< Content-Type: application/json; charset=UTF-8
< Content-Length: 104
< Connection: keep-alive
< Set-Cookie: PHPSESSID=997a94c031634c3ba629158990ba3b3f; path=/; HttpOnly
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate
< Pragma: no-cache
<
{"name":"Bad Request","message":"Invalid JSON data in request body: Syntax error","code":0,"status":400}* Connection #0 to host omni.top-academy.ru left intact
теперь вот это