Thanks to all, i will look at it tonight!<br><br>nx: not an bad idea, but this is for the powerdns api (might be that powerdns is also used for route53)<br><br>I need to look closer to erlcloud, it sounds interestingly <br><br>Thomas<br><div class="gmail_quote">man. 15. jun. 2015 kl. 19.55 skrev nx <<a href="mailto:nx@nu-ex.com">nx@nu-ex.com</a>>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Use a library for converting Erlang terms to JSON.<div><br></div><div>Jiffy: <a href="https://github.com/davisp/jiffy" target="_blank">https://github.com/davisp/jiffy</a><br></div><div>JSX: <a href="https://github.com/talentdeficit/jsx" target="_blank">https://github.com/talentdeficit/jsx</a><br></div><div><br></div><div>For JSX, you could do the following:</div>
<p><span>Payload = [{<<"rrsets">>, [{<<"name">>, <<"<a href="http://xxx.gl" target="_blank">xxx.gl</a>">>}, {<<"type">>, <<"A">>}, {<<"changetype">>, <<"REPLACE">>}, {<<"records">>, [{<<"content">>, <<"2.1.1.1">>}, {<<"disabled">>, false}, {<<"name">>, <<"<a href="http://xxx.gl" target="_blank">xxx.gl</a>">>}, {<<"ttl">>, <<"3600">>}, {<<"type">>, <<"A">>}, {<<"priority">>, <<"0">>}]}]}],<br>Options = [],</span></p><p>Json = jsx:encode(Payload),</p><p><span>{ok, StatusCode, RespHeaders, ClientRef = hackney:request(</span><span style="font-size:13.1999998092651px;line-height:19.7999992370605px">Method, URL, Headers, Json, Options). </span></p><p>Side-note: maybe you could make a PR to erlcloud (<a href="https://github.com/gleber/erlcloud" target="_blank">https://github.com/gleber/erlcloud</a>) to get Route53 support in? :)</p></div>
</blockquote></div>