Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Скрипт для Windows CMD shell

Code Block
languagebash
titleСкрипт для Windows CMD shell
SET API=http://xxxx/api/v1
SET LOGIN=
SET PASSWORD=

SET CURL=curl.exe
SET HEADER=--header "Accept: application/json"
SET SAVE_COOKIE=--cookie-jar "cookie.txt"
SET LOAD_COOKIE=--cookie "cookie.txt"

%CURL% -X POST --data "" %HEADER% %SAVE_COOKIE% "%API%/account/login?login=%LOGIN%&password=%PASSWORD%"

%CURL% -X GET %HEADER% %LOAD_COOKIE% "%API%/request"

...