# Fetch XML via HTTPS

**URL:** <https://forum.developer.roku.com/t/fetch-xml-via-https/2828>\
**Category:** Archived\
**Tags:** roku-developer-program\
**Created:** [January 18, 2013, 7:40pm UTC](https://forum.developer.roku.com/t/fetch-xml-via-https/2828 "2013-01-18T19:40:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![scottchiefbaker](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@scottchiefbaker](https://forum.developer.roku.com/u/scottchiefbaker)\
**Post date:** [January 18, 2013, 7:40pm UTC](https://forum.developer.roku.com/t/fetch-xml-via-https/2828/1 "2013-01-18T19:40:50Z")

</div>

I want to use HTTPS to fetch my XML files, but simply putting https in the URL isn’t enough. After reading the documentation I think maybe I need to use SetCertificatesFile() to give it some key? The key of the CA? Do I need to bundle the cert with my app, or can I pass it a URL to get the cert?

```auto
url = "https://www.perturb.org/hls/test.xml"
http = NewHttp(url)
http.SetCertificatesFile(???)
rsp = http.GetToStringWithRetry()

```

---

<div class="post-metadata">

**Author:** ![RokuChris](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@RokuChris](https://forum.developer.roku.com/u/RokuChris)\
**Post date:** [January 18, 2013, 7:49pm UTC](https://forum.developer.roku.com/t/fetch-xml-via-https/2828/2 "2013-01-18T19:49:33Z")

</div>

In most cases, you can just use the built in cert bundle.

```auto
xfer.SetCertificatesFile("common:/certs/ca-bundle.crt")

```

[http://sdkdocs.roku.com/display/RokuSDK … rlTransfer](http://sdkdocs.roku.com/display/RokuSDKv48/roUrlTransfer)

> The URL Transfer object authenticates your web server by calling SetCertificatesFile()with a .pem file that includes the certificate authority cert for the authority (like Verisign, Thawte, etc… or your own with OpenSSL) that signed your web server certificate before making the https request. You can use the Roku standard cert bundle (similar to Mozilla) stored in common:/certs/ca-bundle.crt

---

<div class="post-metadata">

**Author:** ![scottchiefbaker](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@scottchiefbaker](https://forum.developer.roku.com/u/scottchiefbaker)\
**Post date:** [January 18, 2013, 8:26pm UTC](https://forum.developer.roku.com/t/fetch-xml-via-https/2828/3 "2013-01-18T20:26:44Z")

</div>

I’m trying to set it, and I’m getting a function not found?

```auto
url = "https://www.perturb.org/hls/test.xml"
http = NewHttp(url)
http.SetCertificatesFile("common:/certs/ca-bundle.crt")
http.InitClientCertificates()

```

```auto
Member function not found in BrightScript Component or interface. (runtime error &hf4) in .../pkg:/source/categoryFeed.brs(65)

065: http.SetCertificatesFile("common:/certs/ca-bundle.crt")

```

---

<div class="post-metadata">

**Author:** ![scottchiefbaker](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@scottchiefbaker](https://forum.developer.roku.com/u/scottchiefbaker)\
**Post date:** [January 18, 2013, 8:40pm UTC](https://forum.developer.roku.com/t/fetch-xml-via-https/2828/4 "2013-01-18T20:40:28Z")

</div>

Disregard… I didn’t realize the roUrlTransfer object was http.Http. Once I set that, it works fine. My HTTPS is working, thanks!
