Ask next back end old man people be so design those who download file interface?

Back end designed an interface, send a condition, return a file, just beginning is no problem. Until one day this is operated, download returned Null file, next the newspaper of format of a Json in the file is wrong. Next I am checked, checked discovery a long time, this newspaper is wrong, the state code that back end returns is 200, but returned Json form (the unsuccessful format) of common interface, I here it is to think of course, as long as be 200 it is normal return. Downloaded so next back end raises this requirement, changeover enforces to answer text first when returning data namely, looking is Json and sign up for wrong code. If be to be cast,go out unusual but I think, mix below this kind of circumstance with (normal file is returned and sign up for a fault to return) , have a problem namely originally. After all the document that you do not know to the family is passed, in case how be in that way format does? Then requirement back end changes state code, but back end does not change. . . . . . . Then the problem was laid aside, ask old man so people the interface that how should design this download file, how should when making mistake, return. . .

Related Posts

3 thoughts on “Ask next back end old man people be so design those who download file interface?

  1. This basic whose speech counterpoises to who listen to greatly, the download that for instance small letter pays is you to Zhang sheet current this kind of form, but the download that pays treasure is to Zhang sheet download link is included again in message, get a document through downloading catenary fetch.

  2. It is OK to return file shedding to return a link, how here looks is back end did not do business unusual processing (him back end

  3. Either, foolish force just so design
    Other interface all is returned 200 also calculated, download makes mistake cannot be of course 200, must return Json, can put in Header in

Leave a Reply

Your email address will not be published. Required fields are marked *