-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
First of all, thank you for your work on this!
I noticed an aspect. apirest.php states (random internet accessible instance is for example at https://suporte.inss.gov.br/glpi/apirest.php/ ) this:
"App-Token: authorization string provided by the GLPI API configuration. Optional." in the "Init Session" section.
Currently python-glpi-api requires apptoken:
Leaving aside documentation aspect, the following patches should fix these.
Currently from L148
# Set required headers.
headers = {
'Content-Type': 'application/json',
'Session-Token': session_token,
'App-Token': apptoken
}
To:
# Set required headers.
headers = {
'Content-Type': 'application/json',
'Session-Token': session_token,
}
if apptoken:
headers['App-Token'] = apptoken
Currently from L174
init_headers = {
'Content-Type': 'application/json',
'App-Token': apptoken
}
To:
init_headers = {
'Content-Type': 'application/json',
}
if apptoken:
init_headers['App-Token'] = apptoken
Metadata
Metadata
Assignees
Labels
No labels