Fiddler's mock data (D)

A, Fiddler analog backstage return 502 error

  

 

  Email this interface again when back on the counter 502 to the front, mainly to see how to handle the front-end

Second, apart from the analog status code of the HTTP request, but also can simulate the body of the response

  First, we can create a return json format data files on your computer, such as response.txt 

    内容---->{ "data": { "token": "e15372119240e6d05f4f6b14b25d7349" },"statusCode": "2000", "message": "登录成功!" }
    We can change ---> { "data": { "token": ""}, "statusCode": "2000", "message": "! Ha ha ha"}
    Next, as the operation:
    

 

    Here you can upload a good response file that we set in advance

    

 

     Again, when sending a request, we will be redirected to design good content, see how to handle the front-end

  

 

  

 

Guess you like

Origin www.cnblogs.com/hally/p/12636892.html