HttpSender

class HttpSender @JvmOverloads constructor(config: CoreConfiguration, method: HttpSender.Method?, type: StringFormat?, formUri: String?) : ReportSender

Create a new HttpSender instance with its destination taken from the supplied config.

Author

F43nd1r & Various

Parameters

config

AcraConfig declaring the

method

HTTP Method to be used to send data. Currently only Method.POST and Method.PUT are available. If Method.PUT is used, the ReportField.REPORT_ID is appended to the formUri to be compliant with RESTful APIs.

type

StringFormat of encoding used to send the report body. StringFormat.KEY_VALUE_LIST is a simple Key/Value pairs list as defined by the application/x-www-form-urlencoded mime type.

Constructors

Link copied to clipboard
fun HttpSender(config: CoreConfiguration, method: HttpSender.Method?, type: StringFormat?, formUri: String? = null)

Types

Link copied to clipboard
enum Method : Enum<HttpSender.Method>

Available HTTP methods to send data. Only POST and PUT are currently supported.

Functions

Link copied to clipboard
open fun requiresForeground(): Boolean
Link copied to clipboard
open override fun send(context: Context, errorContent: CrashReportData)
open fun send(context: Context, errorContent: CrashReportData, extras: Bundle)
Link copied to clipboard
fun setBasicAuth(username: String?, password: String?)

Set credentials for this HttpSender that override (if present) the ones set globally.