Skip to content

Instantly share code, notes, and snippets.

@andreas-nesheim
Created February 5, 2020 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreas-nesheim/0ac9c0049198d8fd8d74dcc8707bd8f8 to your computer and use it in GitHub Desktop.
Save andreas-nesheim/0ac9c0049198d8fd8d74dcc8707bd8f8 to your computer and use it in GitHub Desktop.
public async Task<Device> GetDevice(Room room)
{
var requestUrl = $"uds/selectDevicebyRoom?roomId={room.roomId}";
var response = await httpClient.PostAsync(requestUrl, stringData);
var result = await response.Content.ReadAsStringAsync();
var jsonResult = JsonSerializer.Deserialize<SelectDevicebyRoomResponse>(result);
return jsonResult.data.deviceList.First();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment