Re: Meta-Data documentation

"Alejandro Guerrieri" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Ok, got the new docs almost ready, but have a doubt over the encoding for
sendsms.

What happens if I want to send data with "=", "?" or "&" ? Should I
double-urlencode it?

For example, if I want to send "mydata=Hello Goodbye"

Over sendsms, I'd probably get away with this:

meta-data=%3Fsmpp%3Fmydata=
Hello%20Goodbye

But, how do I code it if I want to send "mydata=Hello & Goodbye" or anything
carrying one of the delimiters? A single urlencoding won't do the trick
because the "&" inside the key/value pair would look identical to the one
separating the meta-data parameter from the rest.

Is the format like this then?:

URLENCODE(?URLENCODE(<smsc-type1>)?
URLENCODE(key1)=URLENCODE(value1)&URLENCODE(key2)=URLENCODE(value2)&...?URLENCODE(<smsc-type2>)?URLENCODE(key1)=URLENCODE(value1)&...
 )

or in other words:

URLENCODE( <urlencoded meta-data string> )

Regards,

Alejandro


On Sun, Sep 21, 2008 at 11:10 AM, Stipe Tolj <[email protected]> wrote:

> Alexander Malysh schrieb:
> > Hi,
> >
> > great thanks!
> >
> > Could you please better describe meta-data format because it unclear how
> > to code it, here is the format accepted by meta-data patch:
> >
> > meta-data = ?URLENCODE(group-name)?URLENCODE(key1)=URLENCODE(value1)...
> >
> > then if you send it e.g. for MT:
> >
> > .../sendsms?meta-data=URLENCODE(meta-data)
>
> great wok Alejandro.
>
> Agree'ing with Alex here. The encoding format of the HTTP GET 'meta-data'
> value
> has to be clear from the user's guide, especially the usage of the '?'
> question
> marks to separate the SMSC protocol module parts of the whole string.
>
> In fact I would generalize like this:
>
>  data =
> ?<smsc-type1>?key1=value1&key2=value2&...?<smsc-type2>?key1=value1&...
>  meta-data = urlencode( data )
>
> Stipe
>
> -------------------------------------------------------------------
> Kölner Landstrasse 419
> 40589 Düsseldorf, NRW, Germany
>
> tolj.org system architecture      Kannel Software Foundation (KSF)
> http://www.tolj.org/              http://www.kannel.org/
>
> mailto:st_{at}_tolj.org <st_%7Bat%7D_tolj.org>           mailto:
> stolj_{at}_kannel.org <stolj_%7Bat%7D_kannel.org>
> -------------------------------------------------------------------
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.