getBaseUrlResponse method

Future<Response> getBaseUrlResponse(
  1. String chapterId
)
inherited

Endpoint used: GET /at-home/server/{id}

Returns a http response of Base URL for chapterId or uuid

Implementation

// Functions to get base url for a chapter ID

///Returns a http response of Base URL for [chapterId] or uuid
Future<http.Response> getBaseUrlResponse(String chapterId) async {
  var unencodedPath = '/at-home/server/$chapterId';
  var response = await http.get(Uri.https(AUTHORITY, unencodedPath),
      headers: {HttpHeaders.contentTypeHeader: 'application/json'});
  return response;
}