Fixed a stackoverflow bug when generating a Rest Client and the object has it's type as a sub type. Bumped package versino to 1.7.5
This commit is contained in:
@ -8,6 +8,7 @@ using System.IO;
|
||||
using MontoyaTech.Rest.Net;
|
||||
using System.Net.Mime;
|
||||
using System.Collections;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace MontoyaTech.Rest.Net.Example
|
||||
{
|
||||
@ -80,6 +81,7 @@ namespace MontoyaTech.Rest.Net.Example
|
||||
new Route<string>(HttpRequestMethod.Get, "/auth/{username}", Exists),
|
||||
new Route(HttpRequestMethod.Post, "/auth/signup", Signup),
|
||||
new Route(HttpRequestMethod.Get, "/auth/", Json),
|
||||
new Route(HttpRequestMethod.Get, "/auth/dynamic", Dynamic),
|
||||
new Route(HttpRequestMethod.Get, "/auth/role", GetRole),
|
||||
new Route(HttpRequestMethod.Post, "/upload", Upload),
|
||||
new Route(HttpRequestMethod.Get, "/download", Download),
|
||||
@ -208,6 +210,13 @@ namespace MontoyaTech.Rest.Net.Example
|
||||
return context.Response.WithStatus(HttpStatusCode.OK).WithJson(new User("Rest.Net"));
|
||||
}
|
||||
|
||||
[RouteGroup("Auth")]
|
||||
[RouteResponse(typeof(JObject))]
|
||||
public static HttpListenerResponse Dynamic(HttpListenerContext context)
|
||||
{
|
||||
return context.Response.WithStatus(HttpStatusCode.OK).WithJson(777);
|
||||
}
|
||||
|
||||
[RouteGroup("Stream")]
|
||||
[RouteRequest(typeof(MemoryStream))]
|
||||
public static HttpListenerResponse Upload(HttpListenerContext context)
|
||||
|
Reference in New Issue
Block a user