Reputation: 544
I am using basic auth in my api. When I enter a wrong credential, it throws
UnauthorizedHttpException.
I want this in JSON format.
Upvotes: 0
Views: 463
Reputation: 36
You should add header "Accept: application/json"
before sending your request.
Upvotes: 2