You need to encode hostname using punycode[1] and path with
percent-encoding[2] before making a request.
[1] -
https://github.com/superbobry/idna See README
[2] - See mochiweb_util:quote_plus/1 function
В Tue, 27 Nov 2012 06:58:05 -0800 (PST)
guyvernk <
gl...@guyvernk.com> пишет:
> I'm so sorry, but addinoinal question.
> How use unicode string in request?
> If i use unicode in Url - error happend.
>
> crasher:
> > initial call: httpc_handler:init/1
> > pid: <0.172.0>
> > registered_name: []
> > exception error: bad argument
> > in function iolist_to_binary/1
> > called as iolist_to_binary(["GET"," ",
> > [47,109,101,116,104,111,100,47,97,117,
> >
> > 100,105,111,46,115,101,97,114,99,104,63,
> >
> > 1083,1086,1083,38,97,99,99,101,115,115,
> >
> > 95,116,111,107,101,110,61,101,50,102,50,
> >
> > 98,55,53,100,101,50,101,101,52,55,51,48,
> >
> > 101,50,101,101,52,55,51,48,97,51,101,50,
> >
> > 100,102,102,55,54,57,101,101,50,101,102,
> >
> > 101,50,101,49,48,53,48,101,98,50,53,97,
> >
> > 101,50,49,51,50,98,98,55,98,100,56,57,
> > 101,99,55,56,53,101,99,50],
> > " ","HTTP/1.1","\r\n",
> > "te: \r\nhost:
> >
api.vk.com\r\nconnection: keep-alive\r\n",
> > "\r\n",[]])
> >
> >
>