문제

I solved my problem by remove the header name/value: Accept-Encoding: gzip, deflate

I'm using HttpClient class to make request to Facebook. I make to request to facebook.

The first is to homepage: The result is the HTML code of Facebook homepage.

The second is login to facebook ( with headers and request body ): The result of this requert is unreadable. It's "��|ko�Hv���.�c��-��jya[v�n��d�� �D�IJ(�&�����rq� ��_���`�/I��X �o�|���o�s��"

If I login failed, the result must be some readable string. What am I encountering? What should i do to resolve this problem ?

도움이 되었습니까?

해결책

You need to check if the content is gzipped or not and deflate it dynamically. Otherwise, just remove the Accept-Encoding: gzip, deflate as you mentioned in your original question

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top