fun upload(path: String, data: String): Boolean
(source)
Overrides PingUploader.upload
Synchronously upload a ping to Mozilla servers.
Note that the X-Client-Type
: Glean
and X-Client-Version
:
headers are added to the HTTP request in addition to the UserAgent. This allows
us to easily handle pings coming from glean on the legacy Mozilla pipeline.
path
- the URL path to append to the server address
data
- the serialized text data to send
Return
true if the ping was correctly dealt with (sent successfully
or faced an unrecoverable error), false if there was a recoverable
error callers can deal with.