protected virtual HttpResponseMessage GetResponseFomDicionario(int position) { if (_client == null) { InitialiseClient(); } string lastPartOfUri = "api/words/" + position; return(ASync.GetResponseMessage(_client, lastPartOfUri).Result); }
public virtual string GetWordAtPosition(int position) { HttpResponseMessage response = GetResponseFomDicionario(position); if (response.IsSuccessStatusCode) { return(ASync.GetContentFromResponse(response).Result); } throw new NoWordAtPositionException(); }