use of com.google.firebase.crashlytics.internal.network.HttpGetRequest in project firebase-android-sdk by firebase.
the class DefaultSettingsSpiCall method invoke.
@Override
public JSONObject invoke(SettingsRequest requestData, boolean dataCollectionToken) {
if (!dataCollectionToken) {
throw new RuntimeException("An invalid data collection token was used.");
}
JSONObject toReturn = null;
try {
final Map<String, String> queryParams = getQueryParamsFor(requestData);
HttpGetRequest httpRequest = createHttpGetRequest(queryParams);
httpRequest = applyHeadersTo(httpRequest, requestData);
logger.d("Requesting settings from " + url);
logger.v("Settings query params were: " + queryParams);
final HttpResponse httpResponse = httpRequest.execute();
toReturn = handleResponse(httpResponse);
} catch (IOException e) {
logger.e("Settings request failed.", e);
toReturn = null;
}
return toReturn;
}
Aggregations