Tecnologia do Blogger.
RSS

Re: [androidbrasil-dev] Passando parâmetro data (Calendar) no endpoint - RETROFIT

Eu ainda acho melhor passar no body do que no path se for millis tbm, pra nao ficar um path gigantesco :D

Em ter, 29 de set de 2015 às 08:53, Rafael de Araújo <orafaaraujo@gmail.com> escreveu:
Não é melhor passar milissegundo (Calendar.getInstance().getTimeInMillis())?

Abraços


Att,
Rafael de Araújo

2015-09-29 9:48 GMT-03:00 Marcelo Alves <malves.info@gmail.com>:
Mas Calendar é um objeto ne? nao tem como ir no path, só se vc formatar essa data para String e passar no path, ou passar no body ...

Em ter, 29 de set de 2015 às 08:47, Raphael Rezzieri <rezzieri@gmail.com> escreveu:
Estou realizando a seguinte requisição, passando data Calendar para interface.

@GET("objec/{dataIni},{dataFim}")
Call<Object> getObject(@Path("dataIni") Calendar dataIni, @Path("dataFim") Calendar dataFim);

Do lado do servidor:(VRaptor)

@Get("/object/{dataIni},{dataFim}")
@AutenticaMobile
public void getObject(Calendar dataIni, Calendar dataFim){
//impl
}

Os argumentos Calendar estão vindo NULL.
Minha dúvida é se na requisição é da forma mencionada que se deve fazer?


--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comentários:

Postar um comentário