w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Bad Request (400) error while trying to access REST API using requests in python

auth argument is to set Authorization header (basic http authentication by default). The API expects credentials in the body:

r = request.post(url, data=xml, headers={'Content-Type':

where xml=b"<authCommand><userID>sdm@company.com</authCommand>...".

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.