viagogo / halkit Goto Github PK
View Code? Open in Web Editor NEWA lightweight .NET library for creating and consuming HAL hypermedia APIs
License: MIT License
A lightweight .NET library for creating and consuming HAL hypermedia APIs
License: MIT License
Hi there,
Has any work been done on the server aspect of HalKit? The intro implies it's for both client and server, but the HEAD appears to be all for consuming HAL services.
Cheers,
Richard
HalKit is a bit of a black box right now - definitely needs some logging to help track down issues
Would it be possible to access response headers from the Resource returned by the call to GetAsync()?
(Or maybe access to the underlying HttpResponse
object or the IApiResponse
created by HalKit?
In particular, I'm looking for ETAGs in the response header so that I can cache resources that don't change often.
(I'm using HalKit for consuming this API which recommends the use of ETAGs):
[(https://api.foxycart.com/docs)]
Would folks be open to a CoreCLR port? It would be nice to have HalKit available for .NET developers working on Linux, Mac, etc.
Hello,
Your HalKit is really simple and easy to use. Thanks!
I am unable to extract the properties being returned by the API
E.g. When I call the API root, there is a property in the returned JSON called 'message'
I have tried adding a property to my RootResource class:
public string message { get; set; }
but it is never populated after my call to GetRootAsync<RootResource>();
All my links work ok. What am I doing wrong?
public class RootResource : Resource
{
public string message { get; set; }
[Rel("fx:user")]
public Link User { get; set; }
[Rel("fx:store")]
public Link Store { get; set; }
[Rel("fx:stores")]
public Link Stores { get; set; }
[Rel("fx:reporting")]
public Link Reporting { get; set; }
[Rel("fx:token")]
public Link Token { get; set; }
}
Hi ,
if i use :
var xMsg = await api.PostAsync < HttpResponseMessage > (link, object);
the xMsg always come (NULL)
noting that , Fiddler shows to me the request and the response are correct and the Status Code is 201 but once it receive to the client it came as NULL
We need to make sure that the HttpClients used by HalClient get disposed eventually to make sure that all handlers get disposed correctly.
e.g. CacheCow Client's CachingHandler depends on the HttpClient instance being disposed to prevent a memory leak (see aliostad/CacheCow#47)
I started using HalKit in one of my projects along with Swashbuckle.AspNetCore. Unfortunately Swashbuckle.AspNetCore throws an exception when it tries to construct the JSON schema of a given type and HalKit's ResourceContractResolver is being used.
The problem occurs because HalKit sets the DeclaredType property of the JsonProperties it creates for the reserved Hal properties (_links, _embedded) however, does not set the UnderlyingName property because obviously, they have no underlying properties. They are not really declared in the resource type causing trouble to Swashbuckle:
I assume it's a bug in HalKit as these JsonProperties (the underlying properties at least) are not declared in the resource class, so these "reserved" JSON properties should not have a DeclaredType set.
What do you think about it?
LinkResolver needs to support all levels of URI Templates https://tools.ietf.org/html/rfc6570#section-1.2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.