public void HashTagConvertedCorrectly(string before, string after) { var hasher = new LocationHashTag(before); var result = hasher.ToString(); Assert.AreEqual(after, result); }
//public async Task<ActionResult> Get(string type, string term, int limit, string source_popularity, string fallback_popularity) public async Task <ActionResult> Get([FromQuery] LocationHashTag model) { //set the message var request = new HttpRequestMessage(HttpMethod.Get, BaseUrl); request.Headers.Add("Accept", "application/json"); //string extra = $"locations?type={type}&term={term}&limit={limit}&source_popularity={source_popularity}&fallback_popularity={fallback_popularity}"; HttpContent content = new StringContent(model.ToJson()); request.Content = content; var httpRequest = _client.CreateClient(); var response = await httpRequest.SendAsync(request); if (response.IsSuccessStatusCode) { var result = await response.Content.ReadAsStringAsync(); return(Ok(result)); } return(BadRequest()); }