Package 

Class HttpSender

  • All Implemented Interfaces:
    org.acra.sender.ReportSender

    
    public final class HttpSender
     implements ReportSender
                        

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

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public enum HttpSender.Method

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

    • Method Summary

      Modifier and Type Method Description
      final Unit setBasicAuth(String username, String password) Set credentials for this HttpSender that override (if present) the ones set globally.
      Unit send(Context context, CrashReportData errorContent)
      • Methods inherited from class org.acra.sender.HttpSender

        requiresForeground, send
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HttpSender

        HttpSender(CoreConfiguration config, HttpSender.Method method, StringFormat type, String formUri)
        Parameters:
        config - AcraConfig declaring the
        method - HTTP Method to be used to send data.
        type - StringFormat of encoding used to send the report body.
      • HttpSender

        HttpSender(CoreConfiguration config, HttpSender.Method method, StringFormat type)
        Parameters:
        config - AcraConfig declaring the
        method - HTTP Method to be used to send data.
        type - StringFormat of encoding used to send the report body.
    • Method Detail

      • setBasicAuth

         final Unit setBasicAuth(String username, String password)

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

        Parameters:
        username - The username to set for HTTP Basic Auth.
        password - The password to set for HTTP Basic Auth.