-
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added more tests and simplified sample
- Loading branch information
Showing
6 changed files
with
49 additions
and
26 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
samples/net48/Net48MvcSample/Controllers/CorrelationIdController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System.Web; | ||
using System.Web.Http; | ||
|
||
namespace Net48MvcSample.Controllers | ||
{ | ||
public class CorrelationIdController : ApiController | ||
{ | ||
public string Get() | ||
{ | ||
var correlationId = HttpContext.Current.Request.Headers["X-Correlation-Id"]; | ||
return correlationId; | ||
} | ||
} | ||
} |
18 changes: 0 additions & 18 deletions
18
samples/net48/Net48MvcSample/Controllers/ValuesController.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
using Refit; | ||
|
||
namespace CorrelationId.Net48.Tests | ||
{ | ||
public interface INet48MvcSampleApiClient | ||
{ | ||
[Get("/api/values")] | ||
Task<IApiResponse<IEnumerable<string>>> GetAsync(); | ||
[Get("/api/correlationid")] | ||
Task<IApiResponse<string>> GetAsync(); | ||
} | ||
} |