(Client) Add isMock to ResponseInfo Object

Summary:
per title

Note:
- This is a part of this PR: https://github.com/facebook/flipper/pull/488

Reviewed By: jknoxville

Differential Revision: D20474257

fbshipit-source-id: d2ac79d03ac67453bd67ecc46ace973be1590c04
This commit is contained in:
Chaiwat Ekkaewnumchai
2020-03-23 21:57:08 -07:00
committed by Facebook GitHub Bot
parent 4eccacbac8
commit 4ea1497387
2 changed files with 2 additions and 0 deletions

View File

@@ -65,6 +65,7 @@ public class NetworkFlipperPlugin extends BufferingFlipperPlugin implements Netw
.put("status", responseInfo.statusCode) .put("status", responseInfo.statusCode)
.put("reason", responseInfo.statusReason) .put("reason", responseInfo.statusReason)
.put("headers", toFlipperObject(responseInfo.headers)) .put("headers", toFlipperObject(responseInfo.headers))
.put("isMock", responseInfo.isMock)
.put("data", toBase64(responseInfo.body)) .put("data", toBase64(responseInfo.body))
.build(); .build();

View File

@@ -55,6 +55,7 @@ public interface NetworkReporter {
public String statusReason; public String statusReason;
public List<Header> headers = new ArrayList<>(); public List<Header> headers = new ArrayList<>();
public byte[] body; public byte[] body;
public boolean isMock = false;
public Header getFirstHeader(final String name) { public Header getFirstHeader(final String name) {
for (Header header : headers) { for (Header header : headers) {