Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

414 Request-URI Too Large #32

Open
jaimerambo opened this issue Jan 31, 2018 · 1 comment
Open

414 Request-URI Too Large #32

jaimerambo opened this issue Jan 31, 2018 · 1 comment

Comments

@jaimerambo
Copy link

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
Copy link

szymond commented Mar 27, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants