Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use rest api ? #1230

Open
scriptvpskita opened this issue May 5, 2024 · 1 comment
Open

how to use rest api ? #1230

scriptvpskita opened this issue May 5, 2024 · 1 comment
Labels
question Further information is requested

Comments

@scriptvpskita
Copy link

scriptvpskita commented May 5, 2024

i try to login with

curl -X POST -d '{"username": "my user", "password": "my pass"}' http://my_domain:my_port/login

but its shown an error
{"success":false,"msg":"Username is required","obj":null}

@scriptvpskita scriptvpskita added the question Further information is requested label May 5, 2024
@dmitriykara
Copy link

You need to use x-www-url-encoded-form

curl --location 'http://<host>:<port>/login' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'username=<your user>' \ --data-urlencode 'password=<your pass>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants