Coder Social home page Coder Social logo

halkit's People

Contributors

akilburge avatar laszlozold avatar maxab avatar wayneduke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

halkit's Issues

"Server" support

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

Add logging in HalKit

HalKit is a bit of a black box right now - definitely needs some logging to help track down issues

Accessing Response Headers

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)]

Port to CoreCLR

Would folks be open to a CoreCLR port? It would be nice to have HalKit available for .NET developers working on Linux, Mac, etc.

Accessing properties

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; }
}

HttpResponseMessage

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

Incompatibility with Swashbuckle.AspNetCore

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:

https://github.com/domaindrivendev/Swashbuckle.AspNetCore/blob/master/src/Swashbuckle.AspNetCore.Newtonsoft/SchemaGenerator/JsonPropertyExtensions.cs#L12

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.