duan5362 2019-01-02 08:36
浏览 534
已采纳

前端从后端获取错误数据

For example:

Go back-end sends:

map{"1": 0, "2": 1}

JavaScript front-end uses fetch to get data from back-end:

{"2": 1, "1": 0, "3": 1}

Is it possible that front-end got data which has one (or two) more element accidentally?

  • 写回答

1条回答 默认 最新

  • doubi4814 2019-01-02 08:41
    关注

    it's impossible, there must be something wrong in your code. two options in my opinion.

    1. make sure your Go Back-end sends right data.

    2. capture data using software wireshark.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?