forked from bonesoul/uhttpsharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIModelBinder.cs
More file actions
34 lines (30 loc) · 1014 Bytes
/
Copy pathIModelBinder.cs
File metadata and controls
34 lines (30 loc) · 1014 Bytes
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
using uhttpsharp.Headers;
namespace uhttpsharp.ModelBinders
{
public interface IModelBinder
{
/// <summary>
/// Gets the object from the unparsed body
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="raw"></param>
/// <param name="prefix"></param>
/// <returns></returns>
T Get<T>(byte[] raw, string prefix);
/// <summary>
/// Gets the object from the body of the given headers
/// </summary>
/// <param name="headers"></param>
/// <typeparam name="T"></typeparam>
/// <returns></returns>
T Get<T>(IHttpHeaders headers);
/// <summary>
/// Gets the object using the prefix from the given headers
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="headers"></param>
/// <param name="prefix"></param>
/// <returns></returns>
T Get<T>(IHttpHeaders headers, string prefix);
}
}