Getting mulitple group POST data using Simple Bridge

26 views
Skip to first unread message

jason stewart

unread,
Jul 22, 2014, 8:45:02 PM7/22/14
to chica...@googlegroups.com
Hi all,

I am trying to send some data over a post form that looks like this

SheetName=%7BBook3%7D%2C%7B0-Jason+.csv%7D&SheetName=%7BBook3%7D%2C%7B1-State.csv%7D
multiple value pairs with the same name.

I was trying to get the data out using
list('POST', [])->
    {output, Req:post_param_group("SheetName")}.

from the instruction from https://github.com/nitrogen/simple_bridge which say it should come out as List but I am getting it as a string

{Book3},{0-Jason .csv}{Book3},{1-State.csv}

which I was expecting to look like this
[{Book3},{0-Jason .csv}, {Book3},{1-State.csv}]

Chicgo Boss API doesn't even mention this function, so is there another way to do this or am I doing this wrong?

jason 

Jesse Gumm

unread,
Jul 22, 2014, 8:51:53 PM7/22/14
to chica...@googlegroups.com
In using {output, Val}, Val can be an iolist, in which case, Erlang
will treat the iolist as it always does: by concatenating strings.

Try returning:

{output, io_lib:format("~p",[ Req:post_param_group("SheetName")])}

To see the actual formatted Erlang terms.

-Jesse
> --
> You received this message because you are subscribed to the Google Groups
> "ChicagoBoss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to chicagoboss...@googlegroups.com.
> Visit this group at http://groups.google.com/group/chicagoboss.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/chicagoboss/265c7254-554c-4b73-901c-5e333039de0b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm

jason stewart

unread,
Jul 22, 2014, 8:57:35 PM7/22/14
to chica...@googlegroups.com
Worked like a charm, I guess it not what you see, but the way that you see it :)
Reply all
Reply to author
Forward
0 new messages