Keyboard Shortcuts
Likes
Search
https Get request through Crestron vs. browser
I'm trying to make an https get request to retrieve some weather information from the national weather service.? If I paste the url into the address bar of chrome it works perfectly.? If I make the exact same https get request through S# (vs2008) on a CP4 I get a response code of 403 - forbidden.
Any ideas on how to get the request to work through a Crestron processor would be greatly appreciated. Thanks in advance for the help Jay |
开云体育Thanks.? I was thinking that was the issue.? But, I know that chrome puts out a lot of header info and I was hoping someone might have an idea on what might be important vs just trying to include everything. Thanks again Jay On 4/7/2023 6:37 PM, cmac_HT wrote:
|
Https requires encryption. You would need to use simpl# for that.? On Fri, Apr 7, 2023, 7:31 PM jbasen <jay.m.basen@...> wrote: I'm trying to make an https get request to retrieve some weather |
toggle quoted message
Show quoted text
|
Hi Jay,
how did you get it working? Would love to see the solution. ?Been playing with this on and off when I get time. ?Posted this but no replies as yet. /g/crestron/message/249489?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3ACreated%2C%2CHttps%2C20%2C2%2C20%2C97628203 |
开云体育There are quite a few examples on my GitHub of doing https communications using S#/C# with a product ().? You should be able to simply copy the basic code from one of those to get you started. In this case the specific request setup that I found worked for the national weather service was: ?? ???? ??? ??? request.KeepAlive = false; I'm not sure which ones were critical vs. which ones chrome just
included and the nws didn't care about but it worked and that was
all that mattered to me.? Any product that I've written a driver for that communicates with a web service is going to require https.? Ones that have local api's may not.? Also the newer drivers I've written will use newtonsoft for parsing returned json while in older ones I will manually parse the json. Hope this helps Jay On 4/7/2023 11:04 PM, ScubaSteve wrote:
Hi Jay, |