Re: [WebDNA] TCPConnect w/ user:pass
This WebDNA talk-list message is from 2009
It keeps the original formatting.
numero = 102535
interpreted = N
texte = --000e0cd341005152420469a5bd84Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: 7bitDan,Hmmmm... you tell the truth. I obviously didn't read the api docs closely;-) I have however now tested it against an api call that requiresauthentication, and it does seem to work (code below).Just one thought - I'm pretty sure twitter expects UTF-8 encoding. Is itpossible that your template that makes the call is using a differentcharacter set and maybe the username or password contains a character thatis being encoded incorrectly?- Tom[!]------------------------------------### Connect to twitter and pull down user's followers ###[/!][TCPConnect host=twitter.com][!][/!][text]xmlresponse=[tcpsend skipheader=T]GET /statuses/followers.xmlHTTP/1.0[unurl]%0D%0A[/unurl][!][/!]Authorization: Basic [encryptmethod=Base64][user_id]:[user_pw][/encrypt][unurl]%0D%0A[/unurl][!][/!][unurl]%0D%0A%0D%0A[/unurl][/tcpsend][/text][!][/!][/tcpconnect][!][/!][xmlresponse]--000e0cd341005152420469a5bd84Content-Type: text/html; charset=UTF-8Content-Transfer-Encoding: quoted-printableDan,
Hmmmm... =C2=A0you tell the truth. =C2=A0I obviousl=y didn't read the api docs closely ;-) =C2=A0I have however now tested =it against an api call that requires authentication, and it does seem to wo=rk (code below).
Just one thought - I'm pretty sure twitter expects =UTF-8 encoding. =C2=A0Is it possible that your template that makes the call= is using a different character set and maybe the username or password cont=ains a character that is being encoded incorrectly?
- Tom
[!]<=/div>
----------=--------------------------
### =C2=A0Connect to twitter and pull down user's followers =C2=A0 ##=#
[/!][text]xmlresponse==3D[tcpsend skipheader=3DT]GET /statuses/followers.xml HTTP/1.0[unurl]%0D%0=A[/unurl][!]
[/!]Authorization: Basic [encrypt method=3DBase64][user_id]:[user_pw][=/encrypt][unurl]%0D%0A[/unurl][!]
[/!][unurl]%0D%0A%0D%0A[/unurl][/tcpsend][/text][!]
[/!][/tc=pconnect][!]
[/!][xmlresponse]
--000e0cd341005152420469a5bd84--
Associated Messages, from the most recent to the oldest:
--000e0cd341005152420469a5bd84Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: 7bitDan,Hmmmm... you tell the truth. I obviously didn't read the api docs closely;-) I have however now tested it against an api call that requiresauthentication, and it does seem to work (code below).Just one thought - I'm pretty sure twitter expects UTF-8 encoding. Is itpossible that your template that makes the call is using a differentcharacter set and maybe the username or password contains a character thatis being encoded incorrectly?- Tom[!]------------------------------------### Connect to twitter and pull down user's followers ###[/!][TCPConnect host=twitter.com][!][/!][text]xmlresponse=[tcpsend skipheader=T]GET /statuses/followers.xmlHTTP/1.0[unurl]%0D%0A[/unurl][!][/!]Authorization: Basic [encryptmethod=Base64][user_id]:[user_pw][/encrypt][unurl]%0D%0A[/unurl][!][/!][unurl]%0D%0A%0D%0A[/unurl][/tcpsend][/text][!][/!][/tcpconnect][!][/!][xmlresponse]--000e0cd341005152420469a5bd84Content-Type: text/html; charset=UTF-8Content-Transfer-Encoding: quoted-printableDan,
Hmmmm... =C2=A0you tell the truth. =C2=A0I obviousl=y didn't read the api docs closely ;-) =C2=A0I have however now tested =it against an api call that requires authentication, and it does seem to wo=rk (code below).
Just one thought - I'm pretty sure twitter expects =UTF-8 encoding. =C2=A0Is it possible that your template that makes the call= is using a different character set and maybe the username or password cont=ains a character that is being encoded incorrectly?
- Tom