forked from JohnnyCrazy/SpotifyAPI-NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRequest.cs
More file actions
53 lines (44 loc) · 1.27 KB
/
Request.cs
File metadata and controls
53 lines (44 loc) · 1.27 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
using System;
using System.Collections.Generic;
using System.Net.Http;
namespace SpotifyAPI.Web.Http
{
public class Request : IRequest
{
public Request(Uri baseAddress, Uri endpoint, HttpMethod method)
{
Headers = new Dictionary<string, string>();
Parameters = new Dictionary<string, string>();
BaseAddress = baseAddress;
Endpoint = endpoint;
Method = method;
}
public Request(Uri baseAddress, Uri endpoint, HttpMethod method, IDictionary<string, string> headers)
{
Headers = headers;
Parameters = new Dictionary<string, string>();
BaseAddress = baseAddress;
Endpoint = endpoint;
Method = method;
}
public Request(
Uri baseAddress,
Uri endpoint,
HttpMethod method,
IDictionary<string, string> headers,
IDictionary<string, string> parameters)
{
Headers = headers;
Parameters = parameters;
BaseAddress = baseAddress;
Endpoint = endpoint;
Method = method;
}
public Uri BaseAddress { get; set; }
public Uri Endpoint { get; set; }
public IDictionary<string, string> Headers { get; }
public IDictionary<string, string> Parameters { get; }
public HttpMethod Method { get; set; }
public object? Body { get; set; }
}
}