-1

I have used Drupal 7 before and the web services were working perfectly fine. I recently started working on Drupal 8 (8.8 to be precise), and the login service is not working properly. When I do not give the username or the password it should ideally give a message that username/password must be entered. But I am not getting any response here.

It's just returning HTML content. I have been searching lot of posts on this and nothing seems to work for me. I am testing the same in Postman. Below is the screenshot of the same. Postman screenshot with login service

I have gone through the below links before posting here..

https://stackoverflow.com/questions/31230351/drupal-8-restful-webservices-only-delivering-html

User login REST POST returns HTML format

User login REST format

Nothing seems to work for me. Kindly suggest. Need your help. Thanks in advance!!

1 Answer 1

0

For the postman section of your issue: /user/login?_format=json is a POST request (not get as in your screenshot) and the body should be JSON not x-www-form.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.