I have a method that calls an http request, and I need to output it like it is,
Right now I'm testing the code so I used a ReadAsString which adds \n and \"
I would like to know what is the easiest way to return it to be shown by Ok, I'm not using on this code this information, it's just going through here so would love to avoid creating an object to support this.
The method that is being called
public async Task<String> GetGoogleLocation(string address){
var request = new HttpRequestMessage(HttpMethod.Get, string.Format(GeoCodeApi, address));
var response = await this._proxy.SendAsync(request);
return await response.Content.ReadAsStringAsync();
}
my endpoint:
public async Task<IHttpActionResult> geoLocateAddress(){
return this.Ok(await this._geoCodeService.GetGoogleLocation("Address"));
}