forked from paypal/paypalhttp_dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HttpRequest.cs
29 lines (25 loc) · 841 Bytes
/
HttpRequest.cs
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
using System;
using System.Net.Http;
namespace PayPalHttp
{
public class HttpRequest : HttpRequestMessage
{
public string Path { get; set; }
public object Body { get; set; }
public string ContentType { get; set; }
public string ContentEncoding { get; set; }
public Type ResponseType { get; }
public HttpRequest(string path, HttpMethod method, Type responseType)
{
Path = path;
ResponseType = responseType;
base.Method = method;
ContentEncoding = "identity";
}
public HttpRequest(string path, HttpMethod method) : this(path, method, typeof(void)) {}
public T Clone<T>() where T: HttpRequest
{
return (T) MemberwiseClone();
}
}
}