public static async Task <HalEndpointClient> Load(HalLink halLink, IHttpClientFactory fetcher)
        {
            var client = new HalEndpointClient(halLink, fetcher);
            await client.Load(default(Object), default(Object));

            return(client);
        }
 public Task <RawEndpointResult> LoadRawLinkWithForm <FormType>(string rel, FormType data)
 {
     if (links != null)
     {
         var link = links[rel];
         if (link != null)
         {
             var client = new HalEndpointClient(link.ToObject <HalLink>(), clientFactory);
             return(client.LoadWithFormRaw(data, default(Object)));
         }
     }
     throw new InvalidOperationException($"Cannot find a link named {rel}.");
 }
        public async Task <HalEndpointClient> LoadLinkWithForm <FormType>(String rel, FormType data)
        {
            if (links != null)
            {
                var link = links[rel];
                if (link != null)
                {
                    var client = new HalEndpointClient(link.ToObject <HalLink>(), clientFactory);
                    await client.LoadWithForm(data, null);

                    return(client);
                }
            }
            throw new InvalidOperationException($"Cannot find a link named {rel}.");
        }
        public Task <RawEndpointResult> LoadRawLink(string rel)
        {
            if (links != null)
            {
                var jObjLink = links[rel];
                if (jObjLink != null)
                {
                    var link = jObjLink.ToObject <HalLink>();
                    //Since this is a no arg request add any request data
                    if (link.RequestData != null && link.RequestData.Count > 0)
                    {
                        return(LoadRawLinkWithData(rel, link.RequestData));
                    }

                    var client = new HalEndpointClient(link, clientFactory);
                    return(client.LoadRaw(default(Object), default(Object)));
                }
            }
            throw new InvalidOperationException($"Cannot find a link named {rel}.");
        }