# -*- coding: utf-8 -*-
import http.client, urllib.parse, json, time
# **********************************************
# *** Update or verify the following values. ***
# **********************************************
# Replace this with a valid subscription key.
subscriptionKey = 'ENTER KEY HERE'
host = 'westus.api.cognitive.microsoft.com'
service = '/qnamaker/v4.0'
method = '/knowledgebases/create'
def pretty_print (content):
# Note: We convert content to and from an object so we can pretty-print it.
return json.dumps(json.loads(content), indent=4)
def create_kb (path, content):
print ('Calling ' + host + path + '.')
headers = {
'Ocp-Apim-Subscription-Key': subscriptionKey,
'Content-Type': 'application/json',
'Content-Length': len (content)
[WinError 10060] Предположительная связь между автомобилем и частным сектором, а также связь между автомобилем и автомобилем.répondu