Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static HarEntry getRequest(String href) {
- if(!recallProxyUsed()) {
- System.out.println("Proxy not recording, skipping fetch");
- return null;
- }
- int retries = 0;
- Har har = null;
- while (retries < 30) {
- sleep(100);
- retries++;
- har = getHar();
- List<HarEntry> entries = har.getLog().getEntries();
- for (HarEntry entry : entries) {
- String url = entry.getRequest().getUrl();
- if (url.contentEquals(href)) {
- stopRecording();
- return entry;
- }
- }
- }
- writeHarFile(har, "missing-request");
- return null;
- }
Add Comment
Please, Sign In to add comment