How to get yahoo weather information using coldfusion

185 views Asked by At

I am a newbie coldfusion developer. And I want to get yahoo weather information using coldfusion.

So I made a cfm file like this.

<cfset theURL = "https://weather-ydn-yql.media.yahoo.com/forecastrss?location=sunnyvale,ca">
<cfhttp url="#theURL#" charset="utf-8" method="post">
    <cfhttpparam type="formfield" name="appid" value="2a0Lkq6k">
    <cfhttpparam type="formfield" name="context" value="dj0yJmk9MkxEcTlzVDNucE5hJnM9Y29uc3VtZXJzZWNyZXQmc3Y9MCZ4PWMx">
    <cfhttpparam type="formfield" name="query" value="madonna">
</cfhttp>

And I got a error like this.

Your call to Yahoo Web Services returned an unexpected HTTP status of: 401

I have rich experience in laravel, django or so. But I don't know coldfusion as well as yahoo weather api.

How can I fix this and get the result?

0

There are 0 answers