Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Event "Carteiro não atendido - Entrega não realizada" #8

Open
dhiogoboza opened this issue Jun 19, 2020 · 7 comments
Open

Event "Carteiro não atendido - Entrega não realizada" #8

dhiogoboza opened this issue Jun 19, 2020 · 7 comments
Labels
enhancement New feature or request

Comments

@dhiogoboza
Copy link

dhiogoboza commented Jun 19, 2020

The event "Carteiro não atendido - Entrega não realizada Será realizada nova tentativa de entrega" is with details null and the information "Será realizada nova tentativa de entrega" is missing.

Tracking code to reproduce: LO886053614CN

Events tracked with rastreio-java (description, details):

Objeto postado, null
Objeto recebido na unidade de exportação no país de origem, null
Objeto encaminhado, de País em CHINA / para País em Unidade de Tratamento Internacional / BR
Objeto encaminhado, de País em CHINA / para País em Unidade de Tratamento Internacional / BR
Objeto recebido pelos Correios do Brasil, null
Fiscalização aduaneira finalizada, null
Objeto encaminhado, de Unidade de Distribuição em CURITIBA / PR para Unidade de Tratamento em CAJAMAR / SP
Objeto encaminhado, de Unidade de Tratamento em CAJAMAR / SP para Unidade de Tratamento em RECIFE / PE
Objeto encaminhado, de Unidade de Tratamento em RECIFE / PE para Agência dos Correios em Extremoz / RN
Objeto saiu para entrega ao destinatário, null
Carteiro não atendido - Entrega não realizada, null*
Objeto saiu para entrega ao destinatário, null
Objeto entregue ao destinatário, null

* I believe details should be "Será realizada nova tentativa de entrega"

@rubenochiavone
Copy link
Owner

Maybe this is a duplicate of #4. I will assess and let you know.

@dhiogoboza
Copy link
Author

dhiogoboza commented Jun 22, 2020

Hmm, I understand. Maybe would be good change the URL to request the events.

@rubenochiavone rubenochiavone added the enhancement New feature or request label Jun 22, 2020
@rubenochiavone
Copy link
Owner

Confirming that this tracking code has the same behavior of #4 - they differ from correios official web page. See the screenshot below:

image

So, there is nothing we can do here. Hope you can understand.

@rubenochiavone
Copy link
Owner

Hmm, I understand. Maybe would be good change the URL to request the events.

AFAIK the URL we use is the only one that is possible to query data from Correio's without requiring an account. If you are able to get a new one, I will be happy to adapt the code accordingly as long as it improve our responses.

@rubenochiavone rubenochiavone added the help wanted Extra attention is needed label Aug 15, 2020
@rubenochiavone
Copy link
Owner

I see. When I first tried this, I stumbled into curl not handling the responses properly. However, I went a little deeper into it and realized that it requires that all cookies are forwarded during redirects to get a proper response - since browsers implement a cookie jar when following redirects we are able to do it with get-to-post-util. As far as I searched, curl doesn't support to follow redirects and pass cookies on a single command.

Anyway, I think by changing to use this URL would have a performance impact (HTTP redirect, cookie jar handling and bigger responses), but it would have better results. What do you think if we keep both implementations and client code can toggle between two? If we do that, it would be a smoother change and a first step towards #5.

@dhiogoboza
Copy link
Author

HI. I believe that will be good if you keep both implementations and the user choose an option. I will choose the option with more information. Will be nice!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants