Hallo,
iam trying to connect to the api with an Basicprogrammed Microcontroller. My Problem is that i can only connect with IPadresses instead of a domain/subdomain names.
I send this (raw tcpip) to the server:
Tcpwrite(i , "GET /api/my_valid_api_key/astronomy/q/DL/Freiburg.json HTTP/1.1{013}{010}" ) ' send get
Tcpwrite(i , "Host: api.wunderground.com{013}{010}" ) ' give the Hostname
Here the Response:
S:0 HTTP/1.1 200 OK
S:0 Date: Wed, 05 Dec 2012 18:20:50 GMT
S:0 Server: Apache/1.3.42 (Unix) PHP/5.3.2
S:0 Cache-control: no-cache, must-revalidate, no-cache="Set-Cookie", private
S:0 Expires: Fri, 01 Jan 1990 00:00:00 GMT
S:0 Pragma: no-cache
S:0 X-CreationTime: 0.018
S:0 Set-Cookie: DT=1354731650:7795:365-q3; path=/; expires=Fri, 01-Jan-2020 00:00:00 GMT; domain=.wunderground.com
S:0 Connection: close
S:0 Transfer-Encoding: chunked
S:0 Content-Type: text/plain
S:0
S:0 109
S:0
S:0
S:0 {
S:0 "response": {
S:0 "version": "0.1"
S:0 ,"termsofService": "http://www.wunderground.com/weather/a..."
S:0 ,"features": {
S:0
S:0 }
S:0
S:0 ,
S:0 "error": {
S:0 "type": "missingkey"
S:0
S:0 ,"description": "you must supply a key"
S:0
S:0 }
S:0
S:0
S:0
S:0 }
How should i give the key ?
any ideas ?
THX
Chris
iam trying to connect to the api with an Basicprogrammed Microcontroller. My Problem is that i can only connect with IPadresses instead of a domain/subdomain names.
I send this (raw tcpip) to the server:
Tcpwrite(i , "GET /api/my_valid_api_key/astronomy/q/DL/Freiburg.json HTTP/1.1{013}{010}" ) ' send get
Tcpwrite(i , "Host: api.wunderground.com{013}{010}" ) ' give the Hostname
Here the Response:
S:0 HTTP/1.1 200 OK
S:0 Date: Wed, 05 Dec 2012 18:20:50 GMT
S:0 Server: Apache/1.3.42 (Unix) PHP/5.3.2
S:0 Cache-control: no-cache, must-revalidate, no-cache="Set-Cookie", private
S:0 Expires: Fri, 01 Jan 1990 00:00:00 GMT
S:0 Pragma: no-cache
S:0 X-CreationTime: 0.018
S:0 Set-Cookie: DT=1354731650:7795:365-q3; path=/; expires=Fri, 01-Jan-2020 00:00:00 GMT; domain=.wunderground.com
S:0 Connection: close
S:0 Transfer-Encoding: chunked
S:0 Content-Type: text/plain
S:0
S:0 109
S:0
S:0
S:0 {
S:0 "response": {
S:0 "version": "0.1"
S:0 ,"termsofService": "http://www.wunderground.com/weather/a..."
S:0 ,"features": {
S:0
S:0 }
S:0
S:0 ,
S:0 "error": {
S:0 "type": "missingkey"
S:0
S:0 ,"description": "you must supply a key"
S:0
S:0 }
S:0
S:0
S:0
S:0 }
How should i give the key ?
any ideas ?
THX
Chris