android-components / mozilla.components.service.glean.net / HttpPingUploader

HttpPingUploader

class HttpPingUploader : PingUploader (source)

A simple ping Uploader, which implements a "send once" policy, never storing or attempting to send the ping again.

Constructors

<init>

HttpPingUploader(configuration: Configuration)

A simple ping Uploader, which implements a "send once" policy, never storing or attempting to send the ping again.

Functions

doUpload

fun doUpload(connection: HttpURLConnection, data: String): Int

openConnection

fun openConnection(endpoint: String, path: String): HttpURLConnection

upload

fun upload(path: String, data: String): Boolean

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.

Inherited Functions

createDateHeaderValue

open fun createDateHeaderValue(): String