def __init__(self, *args, **kwargs): BaseHttpClient.__init__(self, *args, **kwargs) self.default_headers = {'Connection': 'keep-alive'} gitlab_service_info = custom_config.GITLAB_SERVICE_API if gitlab_service_info is not None: for k, v in gitlab_service_info.items(): setattr(self, k, v)
def __init__(self, token, *args, **kwargs): BaseHttpClient.__init__(self, *args, **kwargs) self.default_headers = {'Connection': 'keep-alive', 'Content-Type': 'application/x-www-form-urlencoded'} self.default_params = {'AccessToken': token} api_info = settings.UCLOUD_APP for k, v in api_info.items(): setattr(self, k, v)
def __init__(self, sso_user_id, sso_user_token, *args, **kwargs): BaseHttpClient.__init__(self, *args, **kwargs) self.default_headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': 'Bearer {0}'.format(sso_user_token) } self.base_url = SSO_BASE_URL self.sso_user_id = sso_user_id self.sso_user_token = sso_user_token
def __init__(self, *args, **kwargs): BaseHttpClient.__init__(self, *args, **kwargs) self.default_headers = {'Connection': 'keep-alive', 'Content-Type': 'application/json'} self.url = settings.APP_SERVICE_API["url"]
def __init__(self, *args, **kwargs): BaseHttpClient.__init__(self, *args, **kwargs) self.default_headers = {'Connection': 'keep-alive'} self.base_url = 'https://api.github.com'
def __init__(self, *args, **kwargs): BaseHttpClient.__init__(self, *args, **kwargs) self.default_headers = {'Connection': 'keep-alive'}
def __init__(self, *args, **kwargs): BaseHttpClient.__init__(self, *args, **kwargs) self.default_headers = { 'Connection': 'keep-alive', 'Content-Type': 'application/json' }
def __init__(self, *args, **kwargs): BaseHttpClient.__init__(self, *args, **kwargs) self.default_headers = {'Connection': 'keep-alive', 'Content-Type': 'application/json'} youpai_infos = settings.YOUPAI self.default_headers.update({"Authorization": "Bearer " + youpai_infos["ACCESS_TOKEN"]}) self.BaseAPIURL = youpai_infos["URL"]