-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathHttpEntry.cs
More file actions
90 lines (75 loc) · 2.57 KB
/
HttpEntry.cs
File metadata and controls
90 lines (75 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
using System;
using System.Collections.Generic;
namespace SpringComp.Interop
{
/// <summary>
/// A simple class to hold details of an HTTP call.
/// </summary>
public sealed class HttpEntry
{
/// <summary>
/// Initialize a new instance of the <see cref="HttpEntry" /> class.
/// </summary>
public HttpEntry()
{
TrackingId = Guid.NewGuid();
CallDateTime = DateTime.UtcNow;
}
/// <summary>
/// An unique identifier for the HTTP call.
/// </summary>
public Guid TrackingId { get; private set; }
/// <summary>
/// Identity of the caller.
/// </summary>
public string CallerIdentity { get; set; }
/// <summary>
/// Timestamp at which the HTTP call took place.
/// </summary>
public DateTime CallDateTime { get; set; }
/// <summary>
/// Verb associated with the HTTP call.
/// </summary>
public string Verb { get; set; }
/// <summary>
/// Http request URI.
/// </summary>
public string RequestUri { get; set; }
/// <summary>
/// Http request headers.
/// </summary>
public IDictionary<string, string[]> RequestHeaders { get; set; }
/// <summary>
/// Http request content-length
/// In the case of chunked transfer encoding,
/// the request headers do not mention the content length.
/// </summary>
public long RequestLength { get; set; }
/// <summary>
/// Http request body, if any.
/// </summary>
public string Request { get; set; }
/// <summary>
/// Http response status code.
/// </summary>
public int StatusCode { get; set; }
/// <summary>
/// Http response headers.
/// </summary>
public IDictionary<string, string[]> ResponseHeaders { get; set; }
/// <summary>
/// Http response content-length
/// In the case of chunked transfer encoding,
/// the response headers do not mention the content length.
/// </summary>
public long ResponseLength { get; set; }
/// <summary>
/// Http response body.
/// </summary>
public string Response { get; set; }
/// <summary>
/// Timestamp representing the duration of the HTTP call.
/// </summary>
public TimeSpan CallDuration { get; set; }
}
}