getAPIHeaders static method

Map<String, String> getAPIHeaders(
  1. String projectId, [
  2. String? referer,
  3. String? origin
])

Implementation

static Map<String, String> getAPIHeaders(
  String projectId, [
  String? referer,
  String? origin,
]) {
  return {
    'x-project-id': projectId,
    'x-sdk-type': CoreConstants.X_SDK_TYPE,
    'x-sdk-version': CoreConstants.X_SDK_VERSION,
    'user-agent': getUserAgent(),
    if (referer != null) 'referer': referer,
    if (origin != null) 'origin': origin,
  };
}