Re: [WebDNA] TCPConnect w/ user:pass

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 102535
interpreted = N
texte = --000e0cd341005152420469a5bd84 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Dan, 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 requires authentication, and it does seem to work (code below). Just one thought - I'm pretty sure twitter expects UTF-8 encoding. Is it possible that your template that makes the call is using a different character set and maybe the username or password contains a character that is 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.xml HTTP/1.0[unurl]%0D%0A[/unurl][!] [/!]Authorization: Basic [encrypt method=Base64][user_id]:[user_pw][/encrypt][unurl]%0D%0A[/unurl][!] [/!][unurl]%0D%0A%0D%0A[/unurl][/tcpsend][/text][!] [/!][/tcpconnect][!] [/!][xmlresponse] --000e0cd341005152420469a5bd84 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Dan,

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 ##= #

[/!][TCPConnect host=3Dtwitter.com][!]
[/!][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:

    
  1. Re: [WebDNA] TCPConnect w/ user:pass ("Dan Strong" 2009)
  2. Re: [WebDNA] TCPConnect w/ user:pass (Tom Duke 2009)
  3. Re: [WebDNA] TCPConnect w/ user:pass ("Dan Strong" 2009)
  4. Re: [WebDNA] TCPConnect w/ user:pass (Tom Duke 2009)
  5. Re: [WebDNA] TCPConnect w/ user:pass ("Dan Strong" 2009)
  6. Re: [WebDNA] TCPConnect w/ user:pass (Stuart Tremain 2009)
  7. Re: [WebDNA] TCPConnect w/ user:pass (Stuart Tremain 2009)
  8. [WebDNA] TCPConnect w/ user:pass ("Dan Strong" 2009)
--000e0cd341005152420469a5bd84 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Dan, 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 requires authentication, and it does seem to work (code below). Just one thought - I'm pretty sure twitter expects UTF-8 encoding. Is it possible that your template that makes the call is using a different character set and maybe the username or password contains a character that is 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.xml HTTP/1.0[unurl]%0D%0A[/unurl][!] [/!]Authorization: Basic [encrypt method=Base64][user_id]:[user_pw][/encrypt][unurl]%0D%0A[/unurl][!] [/!][unurl]%0D%0A%0D%0A[/unurl][/tcpsend][/text][!] [/!][/tcpconnect][!] [/!][xmlresponse] --000e0cd341005152420469a5bd84 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Dan,

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 ##= #

[/!][TCPConnect host=3Dtwitter.com][!]
[/!][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-- Tom Duke

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

[WebDNA] maybe silly suggestion? [founditems] (2015) WebCat2b12 - nesting [tags] (1997) can WC render sites out? (1997) my price won't move (1997) [WebDNA] Ubuntu 14.04 & WebDNA 8.2 (html not rendering) (2017) All questions are welcome on this list (1997) Emailer problem (2000) off topic fetch vs PCS photomaster (1997) WebCat B13 Mac CGI -- Frames question (1997) Formulas.db + Users.db (1997) [include ...] behavior (1997) Pithy questions on webcommerce & siteedit (1997) [WebDNA] Is there a good file upload script available these days? (2009) Configuring E-mail (1997) Multi-processor Mac info ... (1997) NT considerations (1997) no global [username] or [password] displayed ... (1997) WebCatalog [FoundItems] Problem - AGAIN - (1997) relogin same user? (1998) default value from Lookup (was Grant, please help me) (1997)