net.lightbody.bmp.core.har.HarLog Java Examples

The following examples show how to use net.lightbody.bmp.core.har.HarLog. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JsonPreviewActivity.java    From AndroidHttpCapture with MIT License 6 votes vote down vote up
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_json);
        ButterKnife.bind(this);
//
//        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
//        setSupportActionBar(toolbar);

        setupActionBar();

        try {
            int pos = getIntent().getIntExtra("pos",-1);
            if(pos > -1){
                HarLog harLog = ((SysApplication) getApplication()).proxy.getHar().getLog();
                HarEntry harEntry = harLog.getEntries().get(pos);
                content = harEntry.getResponse().getContent().getText();
                initViewDelay(content);
            }else{
                finish();
            }
        } catch (Exception e) {
            e.printStackTrace();
            finish();
        }
    }
 
Example #2
Source File: CaptureService.java    From CapturePacket with MIT License 5 votes vote down vote up
@Override
public void onLowMemory() {
    super.onLowMemory();
    HLog.w(TAG, "onLowMemory()");
    if (mProxyServer != null) {
        Har har = mProxyServer.newHar();
        if (har != null) {
            HarLog log = har.getLog();
            log.clearAllEntries();
            log.server = null;
            mProxyServer.mHarCallback.onClearEntries();
        }
    }
}
 
Example #3
Source File: BrowserMobProxyServer.java    From CapturePacket with MIT License 3 votes vote down vote up
@Override
public Har newHar(String initialPageRef, String initialPageTitle) {
    Har oldHar = getHar();

    addHarCaptureFilter();

    harPageCount.set(0);

    this.har = new Har(new HarLog(HAR_CREATOR_VERSION,this));

    newPage(initialPageRef, initialPageTitle);

    return oldHar;
}
 
Example #4
Source File: BrowserMobProxyServer.java    From Dream-Catcher with MIT License 3 votes vote down vote up
@Override
public Har newHar(String initialPageRef, String initialPageTitle) {
    Har oldHar = getHar();

    addHarCaptureFilter();

    harPageCount.set(0);

    this.har = new Har(new HarLog(HAR_CREATOR_VERSION));

    newPage(initialPageRef, initialPageTitle);

    return oldHar;
}
 
Example #5
Source File: BrowserMobProxyServer.java    From AndroidHttpCapture with MIT License 3 votes vote down vote up
@Override
public Har newHar(String initialPageRef, String initialPageTitle) {
    Har oldHar = getHar();

    addHarCaptureFilter();

    harPageCount.set(0);

    this.har = new Har(new HarLog(HAR_CREATOR_VERSION,this));

    newPage(initialPageRef, initialPageTitle);

    return oldHar;
}