Unrecognized field 'clientIPAddress' in page element

126 views
Skip to first unread message

Oscar Hernandez

unread,
Sep 14, 2017, 2:57:15 PM9/14/17
to HTTP Archive Specification
Hi, I'm using http://mockbin.com when using Bin Access Log

GET /bin/3c149e20-bc9c-4c68-8614-048e6023a108/log

the result can not be mapped to a HarLog. It gives me the following error:

Fatal error: Unrecognized field 'clientIPAddress' in page element
 
at [Source: org.apache.http.client.entity.LazyDecompressingInputStream@7b49cea0; line: 11, column: 29]
org.codehaus.jackson.JsonParseException: Unrecognized field 'clientIPAddress' in page element
 
at [Source: org.apache.http.client.entity.LazyDecompressingInputStream@7b49cea0; line: 11, column: 29]
at edu.umass.cs.benchlab.har.HarEntry. <init> (HarEntry.java:200)
at edu.umass.cs.benchlab.har.HarEntries. <init> (HarEntries.java:86)
at edu.umass.cs.benchlab.har.HarLog. <init> (HarLog.java:131)
at edu.umass.cs.benchlab.har.tools.HarFileReader.readHarFile (HarFileReader.java:67)
at DownloadFileExe.main (DownloadFileExe.java:148)


My code is as follows:


HttpGet method = new HttpGet ("http://mockbin.com/bin/3c149e20-bc9c-4c68-8614-048e6023a108/log");
method.addHeader ("accept", "application / json");


HttpResponse response = client.execute (method);
int statusCode = response.getStatusLine (). getStatusCode ();

InputStream body = response.getEntity (). GetContent ();

JsonParser jp = new JsonFactory (). CreateJsonParser (body);
HarFileReader r = new HarFileReader ();

List <HarWarning> warnings = new ArrayList <HarWarning> ();
HarLog log = r.readHarFile (jp, warnings);
Reply all
Reply to author
Forward
0 new messages