https://kotlinlang.org logo
#ktor
Title
# ktor
t

Tony Blundell

08/29/2019, 11:05 AM
Hi, is there any way to pass a cert when making a request with Ktor Client? Something like…
Copy code
# python requests lib
        url = '<https://example.com>'
        headers = {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
        cert = (path_to_cert_file, path_to_key_file)
        data = {
            'username': username,
            'password': password
        }
        r = <http://requests.post|requests.post>(url, headers=headers, cert=cert, data=data)
e

e5l

08/29/2019, 12:45 PM
Hi @Tony Blundell, you can pass the certificate in specific engines configuration. What engine do you use?
t

Tony Blundell

08/29/2019, 1:32 PM
Ah cool, is there documentation for that? I’m not tied to any specific engine.
t

Tony Blundell

08/29/2019, 3:08 PM
👍 thanks