Using telemessage to generate a phone call from Rev

Björnke von Gierke bvg at mac.com
Fri Apr 10 08:08:46 EDT 2009


On 10 Apr 2009, at 12:28, Kay C Lan wrote:

> Not a web guru so hopefully one of the http
> gurus will chime in with some clarification, but it seems that  
> having a look
> at the Rev Docs for the libURLSetCustomHTTPHeaders  and httpHeaders  
> entries
> and trying to set at least "Content-type" and "text/xml" prior to  
> doing your
> post.

Do not try to bend the guru. There is no guru. Instead, try to bend  
yourself. ;-)

Silly antics aside, the relevant docu entries are correct. What is  
also explained (unfortunately in a too wordy way) are two things that  
got me stumped at first too:

1. There's a default header set that is used every time. This is a  
minimal set to conform to the http standard. You can check this by  
using this code on a virgin session (use "resetall" to get one):

put url "http://google.com"; put libURLLastHTTPHeaders()

2. the httpHeaders are custom headers, which will replace the existing  
ones, or be appended if no such header exists. You can check this by  
setting the same header (for example "user-agent: foobar") to two  
different things. Only the last setting will be in the "real" headers.

Note that libURLSetCustomHTTPHeaders replaces _all_ the current  
headers with whatever you give it. That's why it says "...to implement  
an http method other then...". Because using your own headers is only  
really useful in a case where you know the specification, at which  
point you'd be thoroughly bended, and know what you're doing :)

have fun
björnke

-- 

official ChatRev page:
http://bjoernke.com/runrev/chatrev.php

Chat with other RunRev developers:
go stack URL "http://bjoernke.com/stacks/chatrev/chatrev1.3b3.rev"




More information about the use-livecode mailing list