Files
flipper/android/plugins
bizzguy f806ee41d7 Network plugin - fix issue with responses with empty body (#1776)
Summary:
The Network Plugin does not properly handle network requests that return an empty body (because of the body actually being empty or because the network call returns something like a 404 status).

Also, the creation of mocks using the "Copy Highlighted" command when the original response returns an empty body is not handled properly.

## Fix

The Android plugin now returns a response when the body length is 0.

The client plugin creates a body containing an empty string instead of null when the body is empty.

## Changelog

Fix problem in Network Plugin when original call or mock has an empty body in the response.

Pull Request resolved: https://github.com/facebook/flipper/pull/1776

Test Plan:
The following screen output for the Network Plugin shows that the call is now being handled correctly.  The fields for "status", "size" and "duration" are now populated.

Also, the mock calls are properly defined and shown in yellow.

![image](https://user-images.githubusercontent.com/337874/102738969-5edd5280-4311-11eb-9b46-33a57a50e334.png)

Reviewed By: mweststrate

Differential Revision: D25804212

Pulled By: passy

fbshipit-source-id: b31cc87619c604b4df76e05bca5c86554a1cabff
2021-01-07 04:15:18 -08:00
..
2020-10-07 15:44:33 -07:00