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

caracter truncation on post data #44

Open
ghost opened this issue Jul 10, 2012 · 1 comment
Open

caracter truncation on post data #44

ghost opened this issue Jul 10, 2012 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 10, 2012

client code with charset on content type likes

restfulie
.at("http://localhost:8081/faturamento/boleto/create")
.as("application/xml;charset=utf-8").accept("application/xml").post(object)

generates an exception

Exception in thread "main" br.com.caelum.restfulie.RestfulieException: Unsupported media type 'application/xml;charset=utf-8'
at br.com.caelum.restfulie.mediatype.MediaTypes.forContentType(MediaTypes.java:27)
at br.com.caelum.restfulie.http.apache.ApacheDispatcher.handlerFor(ApacheDispatcher.java:92)
at br.com.caelum.restfulie.http.apache.ApacheDispatcher.process(ApacheDispatcher.java:73)
at br.com.caelum.restfulie.request.RequestStack.process(RequestStack.java:38)
at br.com.caelum.restfulie.request.RequestChain.next(RequestChain.java:20)
at br.com.caelum.restfulie.request.RequestStack.process(RequestStack.java:29)
at br.com.caelum.restfulie.http.DefaultHttpRequest.sendPayload(DefaultHttpRequest.java:43)
at br.com.caelum.restfulie.http.DefaultHttpRequest.post(DefaultHttpRequest.java:98)
at br.com.jslsolucoes.faturamento.service.impl.FaturamentoRestServiceImpl.create(FaturamentoRestServiceImpl.java:73)
at br.com.jslsolucoes.faturamento.service.impl.FaturamentoRestServiceImpl.main(FaturamentoRestServiceImpl.java:28)

without charset type works fine but truncate acentuation os server side

@guilhermesilveira
Copy link
Member

the as method should have splitted the string into two. definately a bug

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

1 participant