Commit edee13ab authored by Romain Courteaud's avatar Romain Courteaud 🐙

slap/hateoas: setup a default user agent

parent fc3927b5
......@@ -36,6 +36,7 @@ import os
import logging
from ..util import _addIpv6Brackets
from ..version import version as slapos_version
from .exception import ResourceNotReady, NotFoundError, \
AuthenticationError, ConnectionError
......@@ -91,6 +92,7 @@ class ConnectionHelper:
if headers is None:
headers = {}
headers.setdefault('Accept', '*/*')
headers.setdefault('User-agent', 'slapos.core/%s' % slapos_version)
if path.startswith('/'):
path = path[1:]
# raise ValueError('method path should be relative: %s' % path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment