typesafe / mnailgun

A simple .Net wrapper library for the Mailgun API that allows you to send messages, create web hooks, manage mailboxes, etc. with minimal effort.
Other
35 stars 25 forks source link

414 Request-URI Too Large #32

Open jaimerambo opened 6 years ago

jaimerambo commented 6 years ago

I try send mail with unrest library and I have this problem this, I used the next code

HttpRequestWithBody request = null;
            request = Unirest.post("********************************" + "messages")
                    .basicAuth("api", "**********************************")
                    .queryString("from", from)
                    .queryString("to", to)
                    .queryString("subject", subject)
                    .queryString("html", html);
            //request.header("content-type", "Content-Type: text/html; charset=UTF-8");

and the response is 414 Request-Uri Too Large.

szymond commented 4 years ago

Html probably is too long for passing in URL. Try using .field("html", html).