Git Product home page Git Product logo

afharchiver's People

Contributors

kcharwood avatar xueshiqiao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

afharchiver's Issues

Support for AFNetworking 2.1.0?

I'm trying to update to AFNetworking 2.1.0 but CocoaPods can't satisfy the requirements in the AFHARchiver spec. Looks like your spec requires AFNetworking/NSURLSession (~> 2.0.0).

Do you know of any incompatibility with AFNetworking 2.1.0?

Here's the CocoaPods output:

[!] Unable to satisfy the following requirements:
- `AFNetworking (= 2.1.0)` required by `Podfile`
- `AFNetworking/Serialization` required by `AFNetworking (2.1.0)`
- `AFNetworking/Security` required by `AFNetworking (2.1.0)`
- `AFNetworking/Reachability` required by `AFNetworking (2.1.0)`
- `AFNetworking/NSURLConnection` required by `AFNetworking (2.1.0)`
- `AFNetworking/NSURLSession` required by `AFNetworking (2.1.0)`
- `AFNetworking/UIKit` required by `AFNetworking (2.1.0)`
- `AFNetworking/Serialization` required by `AFNetworking/NSURLConnection (2.1.0)`
- `AFNetworking/Reachability` required by `AFNetworking/NSURLConnection (2.1.0)`
- `AFNetworking/Security` required by `AFNetworking/NSURLConnection (2.1.0)`
- `AFNetworking/NSURLConnection` required by `AFNetworking/NSURLSession (2.1.0)`
- `AFNetworking/NSURLConnection` required by `AFNetworking/UIKit (2.1.0)`
- `AFNetworking (= 2.1.0)` required by `AFHARchiver (0.2.0)`
- `AFNetworking/NSURLSession (~> 2.0.0)` required by `AFHARchiver (0.2.0)`

fyi - google HAR + NSURL

I think I'll definitely be using your library.
I have an existing HAR file and looking to parse it back in.
You mentioned some tools for reading /viewer - I think this additional library by google is worth a mention. Apologies it shows up as an issue. Probably should do a PR on readme.

https://github.com/joelvh/webpagetest

https://github.com/joelvh/webpagetest/blob/88f51eb139463b749b37ffdcd9bbe1f3ca86b112/agent/browser/ios/VelodromeAgent/HAR.h

screen shot 2016-08-26 at 22 22 09

`/****************************************************************************** Copyright (c) 2012, Google Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice,
    this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions and the following disclaimer in the documentation
    and/or other materials provided with the distribution.

  • Neither the name of Google Inc. nor the names of its contributors
    may be used to endorse or promote products derived from this software
    without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    Created by Mark Cogan on 4/29/2011.

    ******************************************************************************/

import <Foundation/Foundation.h>

import "NSURLResponse+HAR.h"

import "NSURLRequest+HAR.h"

// if YES, don't send a bunch of stuff that makes the raw HAR harder to read

define DEBUG_TIMING NO

// Utility methods for creating basic components of dictionaries and arrays
// destined to be converted into HAR (JSON) files.
// The HAR format:
// https://groups.google.com/group/http-archive-specification/web/har-1-2-spec
//
// This class is never instatiated.
@interface HAR : NSObject

// returns a new HAR dictionary populated with Creator and Browser entries
// and including an empty mutable Entries array

  • (NSMutableDictionary *)HAR;

// Creates a HAR page dictionary with an id of |pageId| and a title of |title|,
// and a boilerplate pageTimings value with -1s for both OnLoad and
// OnContentLoad

  • (NSDictionary *)HARPageWithId:(NSString *)pageId
    title:(NSString *)title
    pageProperties:(NSDictionary *)pageProperties;

// For debugging: walks through the entries in |HAR| and validates that they
// contain responses and send and wait timings. Exceptions are logged to the
// console.

  • (void)HARAudit:(NSDictionary *)HAR;

// Returns an array of HAR HTTP cookie structures corresponding to the
// contents of |cookies|. |cookies| is expected to be an array containing only
// NSHTTPCookie objects.

  • (NSMutableArray *)HARCookiesFromCookieArray:(NSArray *)cookies;

// Given a dictionary of name-value pairs (|headers|) which correspond to
// HTTP request or response headers, update the HAR request or response structure
// |HAR| by adding a Headers array of HAR headers structures, and adding a
// headersSize value corresponding to the totaly bytes of header data implied
// by |headers|
//
// Note that if |DEBUG_TIMING| is true, the header array that's added to |HAR|
// is always empty

  • (void)addHARHeadersFromDictionary:(NSDictionary *)headers
    toHAR:(NSMutableDictionary *)HAR;

@EnD

// common HAR key names

define kHARLog @"log"

define kHARVersion @"version"

define kHARCreator @"creator"

define kHARBrowser @"browser"

define kHARPages @"pages"

define kHAREntries @"entries"

define kHARComment @"comment"

define kHARName @"name"

define kHARStarted @"startedDateTime"

define kHARId @"id"

define kHARTitle @"title"

define kHARPageTimings @"pageTimings"

define kHAROnContentLoad @"onContentLoad"

define kHAROnLoad @"onLoad"

define kHARPageRef @"pageref"

define kHARTime @"time"

define kHARRequest @"request"

define kHARResponse @"response"

define kHARCache @"cache"

define kHARTimings @"timings"

define kHARServerIPAddress @"serverIPAddress"

define kHARConnection @"connection"

define kHARMethod @"method"

define kHARURL @"url"

define kHARHTTPVersion @"httpVersion"

define kHARCookies @"cookies"

define kHARHeaders @"headers"

define kHARQueryString @"queryString"

define kHARPostData @"postData"

define kHARHeadersSize @"headersSize"

define kHARBodySize @"bodySize"

define kHARStatus @"status"

define kHARStatusText @"statusText"

define kHARContent @"content"

define kHARRedirectURL @"redirectURL"

// cookies

define kHARValue @"value"

define kHARPath @"path"

define kHARDomain @"domain"

define kHARExpires @"expires"

define kHARHTTPOnly @"httpOnly"

define kHARSecure @"secure"

// post data

define kHARMIMEType @"mimeType"

define kHARParams @"params"

define kHARText @"text"

define kHARFileName @"fileName"

define kHARContentType @"contentType"

// content

define kHARSize @"size"

define kHARCompression @"compression"

define kHAREncoding @"encoding"

// cache

define kHARBeforeRequest @"beforeRequest"

define kHARAfterRequest @"afterRequest"

define kHARLastAccess @"lastAccess"

define kHARExpires @"expires"

define kHAReTag @"eTag"

define kHARHitCount @"hitCount"

// timings

define kHARBlocked @"blocked"

define kHARDNS @"dns"

define kHARConnect @"connect"

define kHARSend @"send"

define kHARWait @"wait"

define kHARReceive @"receive"

define kHARSSL @"ssl"

// Any unknown time interval is represented by -1.

define kHARUnknownTimeInterval -1

// The HAR spec allows extensions so long as the extra data starts with an
// underscore. The following keys are used to add data outside the HAR spec.

// We add an object _onloadByMethod to each page object, which holds the onload
// time found using different methods.

define kHAROnloadByMethod @"_onloadByMethod"

define kHarOnloadUIWebViewCallback @"_UIWebviewCallback"

define kHarOnloadInjectedJS @"_injectedJS"

`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.