Search Unity

UnityWebRequest Https request

Discussion in 'General Discussion' started by fbrigidi, Feb 17, 2020.

  1. fbrigidi

    fbrigidi

    Joined:
    Dec 21, 2017
    Posts:
    1
    I am developing an app in Unity 2019.2.20f1 that has to interact with a REST api using https web requests

    When I test the requests on my machine using curl from my terminal everything works as intended, meaning that the certificates are correctly installed on my current user (my os is Windows 10)

    When I try to perform the same requests using a UnityWebRequest though, I'm receiving a "HTTP/1.1 401 Unauthorized" response. Is the default CertificateHandler managing certificates?

    When I tried to switch from UnityWebRequest to HttpWebRequest I also had an issue related to accessing the certificates present in the X509Store of the current user (none was found).

    Is there a way I can solve my problem?
    I also own the .p12 file, can I add it manually to a UnityWebRequest?
     
  2. UnityMaru

    UnityMaru

    Community Engagement Manager PSM

    Joined:
    Mar 16, 2016
    Posts:
    1,227
    MadeFromPolygons likes this.