forked from JSONAPIdotNET/JSONAPI.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseUrlService.cs
More file actions
18 lines (17 loc) · 485 Bytes
/
BaseUrlService.cs
File metadata and controls
18 lines (17 loc) · 485 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using System;
using System.Net.Http;
namespace JSONAPI.Http
{
/// <summary>
/// Default implementation of IBaseUrlService
/// </summary>
public class BaseUrlService : IBaseUrlService
{
public virtual string GetBaseUrl(HttpRequestMessage requestMessage)
{
return
new Uri(requestMessage.RequestUri.AbsoluteUri.Replace(requestMessage.RequestUri.PathAndQuery,
String.Empty)).ToString();
}
}
}