Created
March 19, 2017 06:51
-
-
Save JoachimL/88488b77e05a7cec4c993bb3f7921bdd to your computer and use it in GitHub Desktop.
Get kolonial product
This file contains hidden or 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
public static async Task<KolonialProduct> GetKolonialProductAsync(HttpClient client, string barcode) | |
{ | |
var httpResult = await client.GetAsync(ConfigurationManager.AppSettings["GetKolonialProductUri"] + "&barcode=" + barcode); | |
if (httpResult.IsSuccessStatusCode) | |
{ | |
var json = await httpResult.Content.ReadAsStringAsync(); | |
if (json != null) | |
return JsonConvert.DeserializeObject<KolonialProduct>(json); | |
} | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment