Я работаю над учебником по настройке Cloud Messaging. Я следовал инструкциям в видео на странице https://firebase.google.com/docs/cloud-messaging/js/client?authuser=0
когда я пытаюсь отправить команду curl, я получаю странную ошибку. Я прочитал краткий обзор Cloud Messaging, а также несколько других страниц, пытаясь устранить ошибку, но безрезультатно.
Команда, которую я ввел в командной строке:
curl --header "Authorization: key=AIzaSyCFCmFwwWV53PqV2M-NUZyp6lYSz43tUiQ" --header "Content-Type: application/json" -d '{"to": "di6GZyDevbI:APA91bFhNMiuJaMIE3IQL2NurPCWBhCtzculj5uvx-on121Z0UczJ0FyiiQbaRFvGqNs3bmq084vQ-z-8vF_GZQ5J-QCBrWgp4_saWSwTXytZmScNbPLGRkOQns_QgETStDTmLJwixI1", "notification": { "title": "Hello", "body": "World", "icon": "/firebase_logo.png" }}' https://fcm.googleapis.com/fcm/send
Результат:
curl: (3) Port number ended with 'A'
curl: (6) Could not resolve host: notification
curl: (3) [globbing] unmatched brace in column 1
curl: (6) Could not resolve host: title
curl: (6) Could not resolve host: Hello,
curl: (6) Could not resolve host: body
curl: (6) Could not resolve host: World,
curl: (6) Could not resolve host: icon
curl: (3) <url> malformed
curl: (3) [globbing] unmatched close brace/bracket in column 1
JSON_PARSING_ERROR: Unexpected character (') at position 0.