From 45e5ecdfaecda5bd421f2cfe47b3787982c585f9 Mon Sep 17 00:00:00 2001 From: ali abdolahi Date: Wed, 20 Jul 2022 17:54:58 +0430 Subject: [PATCH 1/8] add ManualHttpTransaction.kt to wrap over HttpTransaction entity. this will help to keep real HttpTransaction entity internal and don't expose it --- .../api/entity/ManualHttpTransaction.kt | 34 +++++++++ .../api/entity/ManualHttpTransaction.kt | 74 +++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 library-no-op/src/main/kotlin/com/chuckerteam/chucker/api/entity/ManualHttpTransaction.kt create mode 100644 library/src/main/kotlin/com/chuckerteam/chucker/api/entity/ManualHttpTransaction.kt diff --git a/library-no-op/src/main/kotlin/com/chuckerteam/chucker/api/entity/ManualHttpTransaction.kt b/library-no-op/src/main/kotlin/com/chuckerteam/chucker/api/entity/ManualHttpTransaction.kt new file mode 100644 index 000000000..621715341 --- /dev/null +++ b/library-no-op/src/main/kotlin/com/chuckerteam/chucker/api/entity/ManualHttpTransaction.kt @@ -0,0 +1,34 @@ +package com.chuckerteam.chucker.api.entity + +/** + * No-op implementation. + */ +public data class ManualHttpTransaction( + public var requestDate: Long?, + public var responseDate: Long?, + public var tookMs: Long?, + public var protocol: String?, + public var method: String?, + public var url: String?, + public var host: String?, + public var path: String?, + public var scheme: String?, + public var responseTlsVersion: String?, + public var responseCipherSuite: String?, + public var requestPayloadSize: Long?, + public var requestContentType: String?, + public var requestHeaders: String?, + public var requestHeadersSize: Long?, + public var requestBody: String?, + public var isRequestBodyEncoded: Boolean = false, + public var responseCode: Int?, + public var responseMessage: String?, + public var error: String?, + public var responsePayloadSize: Long?, + public var responseContentType: String?, + public var responseHeaders: String?, + public var responseHeadersSize: Long?, + public var responseBody: String?, + public var isResponseBodyEncoded: Boolean = false, + public var responseImageData: ByteArray? +) diff --git a/library/src/main/kotlin/com/chuckerteam/chucker/api/entity/ManualHttpTransaction.kt b/library/src/main/kotlin/com/chuckerteam/chucker/api/entity/ManualHttpTransaction.kt new file mode 100644 index 000000000..e025ce0c3 --- /dev/null +++ b/library/src/main/kotlin/com/chuckerteam/chucker/api/entity/ManualHttpTransaction.kt @@ -0,0 +1,74 @@ +package com.chuckerteam.chucker.api.entity + +import com.chuckerteam.chucker.internal.data.entity.HttpTransaction + +/** + * Represent Manual Http transaction that developer want to populate as an custom http transaction + */ +public data class ManualHttpTransaction( + public var requestDate: Long?, + public var responseDate: Long?, + public var tookMs: Long?, + public var protocol: String?, + public var method: String?, + public var url: String?, + public var host: String?, + public var path: String?, + public var scheme: String?, + public var responseTlsVersion: String?, + public var responseCipherSuite: String?, + public var requestPayloadSize: Long?, + public var requestContentType: String?, + public var requestHeaders: String?, + public var requestHeadersSize: Long?, + public var requestBody: String?, + public var isRequestBodyEncoded: Boolean = false, + public var responseCode: Int?, + public var responseMessage: String?, + public var error: String?, + public var responsePayloadSize: Long?, + public var responseContentType: String?, + public var responseHeaders: String?, + public var responseHeadersSize: Long?, + public var responseBody: String?, + public var isResponseBodyEncoded: Boolean = false, + public var responseImageData: ByteArray? +) { + + /** + * this will convert this class to HttpTransaction to be able to save it on database as a real + * transaction. + */ + internal fun convertToHttpTransaction(): HttpTransaction { + return HttpTransaction( + 0, + requestDate, + responseDate, + tookMs, + protocol, + method, + url, + host, + path, + scheme, + responseTlsVersion, + responseCipherSuite, + requestPayloadSize, + requestContentType, + requestHeaders, + requestHeadersSize, + requestBody, + isRequestBodyEncoded, + responseCode, + responseMessage, + error, + responsePayloadSize, + responseContentType, + responseHeaders, + responseHeadersSize, + responseBody, + isResponseBodyEncoded, + responseImageData + ) + } +} From f191019e985ad883c478504e55e72f168bb8b9b6 Mon Sep 17 00:00:00 2001 From: ali abdolahi Date: Wed, 20 Jul 2022 17:56:46 +0430 Subject: [PATCH 2/8] add saveTransaction method to ChuckerCollector.kt. ManualHttpTransaction can be saved into db via this method. --- .../com/chuckerteam/chucker/api/ChuckerCollector.kt | 11 ++++++++++- .../com/chuckerteam/chucker/api/ChuckerCollector.kt | 10 ++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/library-no-op/src/main/kotlin/com/chuckerteam/chucker/api/ChuckerCollector.kt b/library-no-op/src/main/kotlin/com/chuckerteam/chucker/api/ChuckerCollector.kt index 1f0f6ba68..247ad4796 100644 --- a/library-no-op/src/main/kotlin/com/chuckerteam/chucker/api/ChuckerCollector.kt +++ b/library-no-op/src/main/kotlin/com/chuckerteam/chucker/api/ChuckerCollector.kt @@ -1,6 +1,7 @@ package com.chuckerteam.chucker.api import android.content.Context +import com.chuckerteam.chucker.api.entity.ManualHttpTransaction /** * No-op implementation. @@ -10,4 +11,12 @@ public class ChuckerCollector @JvmOverloads constructor( context: Context, public var showNotification: Boolean = true, retentionPeriod: RetentionManager.Period = RetentionManager.Period.ONE_WEEK -) +) { + + /** + * No-op implementation. + */ + public fun saveTransaction(transaction: ManualHttpTransaction) { + // Empty method for the library-no-op artifact + } +} diff --git a/library/src/main/kotlin/com/chuckerteam/chucker/api/ChuckerCollector.kt b/library/src/main/kotlin/com/chuckerteam/chucker/api/ChuckerCollector.kt index b176bd581..8e65dec27 100644 --- a/library/src/main/kotlin/com/chuckerteam/chucker/api/ChuckerCollector.kt +++ b/library/src/main/kotlin/com/chuckerteam/chucker/api/ChuckerCollector.kt @@ -1,6 +1,7 @@ package com.chuckerteam.chucker.api import android.content.Context +import com.chuckerteam.chucker.api.entity.ManualHttpTransaction import com.chuckerteam.chucker.internal.data.entity.HttpTransaction import com.chuckerteam.chucker.internal.data.repository.RepositoryProvider import com.chuckerteam.chucker.internal.support.NotificationHelper @@ -63,4 +64,13 @@ public class ChuckerCollector @JvmOverloads constructor( } } } + + /** + * Call this method whenever you want to save a transaction that is not collected by Chucker interceptor + * + * @param transaction the manual transaction you want to save it manually + */ + public fun saveTransaction(transaction: ManualHttpTransaction) { + onRequestSent(transaction.convertToHttpTransaction()) + } } From aacefb854fa6822ece0e7c03f9e170b3f26362e4 Mon Sep 17 00:00:00 2001 From: ali abdolahi Date: Wed, 20 Jul 2022 18:26:08 +0430 Subject: [PATCH 3/8] add default null value for ManualHttpTransaction.kt to instantiate it more easily --- .../api/entity/ManualHttpTransaction.kt | 50 +++++++++---------- .../api/entity/ManualHttpTransaction.kt | 50 +++++++++---------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/library-no-op/src/main/kotlin/com/chuckerteam/chucker/api/entity/ManualHttpTransaction.kt b/library-no-op/src/main/kotlin/com/chuckerteam/chucker/api/entity/ManualHttpTransaction.kt index 621715341..6cb52966f 100644 --- a/library-no-op/src/main/kotlin/com/chuckerteam/chucker/api/entity/ManualHttpTransaction.kt +++ b/library-no-op/src/main/kotlin/com/chuckerteam/chucker/api/entity/ManualHttpTransaction.kt @@ -4,31 +4,31 @@ package com.chuckerteam.chucker.api.entity * No-op implementation. */ public data class ManualHttpTransaction( - public var requestDate: Long?, - public var responseDate: Long?, - public var tookMs: Long?, - public var protocol: String?, - public var method: String?, - public var url: String?, - public var host: String?, - public var path: String?, - public var scheme: String?, - public var responseTlsVersion: String?, - public var responseCipherSuite: String?, - public var requestPayloadSize: Long?, - public var requestContentType: String?, - public var requestHeaders: String?, - public var requestHeadersSize: Long?, - public var requestBody: String?, + public var requestDate: Long? = null, + public var responseDate: Long? = null, + public var tookMs: Long? = null, + public var protocol: String? = null, + public var method: String? = null, + public var url: String? = null, + public var host: String? = null, + public var path: String? = null, + public var scheme: String? = null, + public var responseTlsVersion: String? = null, + public var responseCipherSuite: String? = null, + public var requestPayloadSize: Long? = null, + public var requestContentType: String? = null, + public var requestHeaders: String? = null, + public var requestHeadersSize: Long? = null, + public var requestBody: String? = null, public var isRequestBodyEncoded: Boolean = false, - public var responseCode: Int?, - public var responseMessage: String?, - public var error: String?, - public var responsePayloadSize: Long?, - public var responseContentType: String?, - public var responseHeaders: String?, - public var responseHeadersSize: Long?, - public var responseBody: String?, + public var responseCode: Int? = null, + public var responseMessage: String? = null, + public var error: String? = null, + public var responsePayloadSize: Long? = null, + public var responseContentType: String? = null, + public var responseHeaders: String? = null, + public var responseHeadersSize: Long? = null, + public var responseBody: String? = null, public var isResponseBodyEncoded: Boolean = false, - public var responseImageData: ByteArray? + public var responseImageData: ByteArray? = null ) diff --git a/library/src/main/kotlin/com/chuckerteam/chucker/api/entity/ManualHttpTransaction.kt b/library/src/main/kotlin/com/chuckerteam/chucker/api/entity/ManualHttpTransaction.kt index e025ce0c3..d82573b6a 100644 --- a/library/src/main/kotlin/com/chuckerteam/chucker/api/entity/ManualHttpTransaction.kt +++ b/library/src/main/kotlin/com/chuckerteam/chucker/api/entity/ManualHttpTransaction.kt @@ -6,33 +6,33 @@ import com.chuckerteam.chucker.internal.data.entity.HttpTransaction * Represent Manual Http transaction that developer want to populate as an custom http transaction */ public data class ManualHttpTransaction( - public var requestDate: Long?, - public var responseDate: Long?, - public var tookMs: Long?, - public var protocol: String?, - public var method: String?, - public var url: String?, - public var host: String?, - public var path: String?, - public var scheme: String?, - public var responseTlsVersion: String?, - public var responseCipherSuite: String?, - public var requestPayloadSize: Long?, - public var requestContentType: String?, - public var requestHeaders: String?, - public var requestHeadersSize: Long?, - public var requestBody: String?, + public var requestDate: Long? = null, + public var responseDate: Long? = null, + public var tookMs: Long? = null, + public var protocol: String? = null, + public var method: String? = null, + public var url: String? = null, + public var host: String? = null, + public var path: String? = null, + public var scheme: String? = null, + public var responseTlsVersion: String? = null, + public var responseCipherSuite: String? = null, + public var requestPayloadSize: Long? = null, + public var requestContentType: String? = null, + public var requestHeaders: String? = null, + public var requestHeadersSize: Long? = null, + public var requestBody: String? = null, public var isRequestBodyEncoded: Boolean = false, - public var responseCode: Int?, - public var responseMessage: String?, - public var error: String?, - public var responsePayloadSize: Long?, - public var responseContentType: String?, - public var responseHeaders: String?, - public var responseHeadersSize: Long?, - public var responseBody: String?, + public var responseCode: Int? = null, + public var responseMessage: String? = null, + public var error: String? = null, + public var responsePayloadSize: Long? = null, + public var responseContentType: String? = null, + public var responseHeaders: String? = null, + public var responseHeadersSize: Long? = null, + public var responseBody: String? = null, public var isResponseBodyEncoded: Boolean = false, - public var responseImageData: ByteArray? + public var responseImageData: ByteArray? = null ) { /** From 085716f1944a39d414fc838e46a38959d959f523 Mon Sep 17 00:00:00 2001 From: ali abdolahi Date: Wed, 20 Jul 2022 18:27:05 +0430 Subject: [PATCH 4/8] add chucker collector as an argument to make it available as an external args --- .../kotlin/com/chuckerteam/chucker/sample/OkHttpUtils.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sample/src/main/kotlin/com/chuckerteam/chucker/sample/OkHttpUtils.kt b/sample/src/main/kotlin/com/chuckerteam/chucker/sample/OkHttpUtils.kt index 33e3e3c50..d6b983e3e 100644 --- a/sample/src/main/kotlin/com/chuckerteam/chucker/sample/OkHttpUtils.kt +++ b/sample/src/main/kotlin/com/chuckerteam/chucker/sample/OkHttpUtils.kt @@ -16,12 +16,13 @@ const val SEGMENT_SIZE = 8_192L fun createOkHttpClient( context: Context, interceptorTypeProvider: InterceptorType.Provider, -): OkHttpClient { - val collector = ChuckerCollector( + collector: ChuckerCollector = ChuckerCollector( context = context, showNotification = true, retentionPeriod = RetentionManager.Period.ONE_HOUR ) +): OkHttpClient { + @Suppress("MagicNumber") val chuckerInterceptor = ChuckerInterceptor.Builder(context) From b9344f62dc6a39c6e43b287dcb3ffff4c34c3782 Mon Sep 17 00:00:00 2001 From: ali abdolahi Date: Wed, 20 Jul 2022 18:32:34 +0430 Subject: [PATCH 5/8] add sample manual transaction to demonstrate how it is working --- .../chucker/sample/ManualTransactionTask.kt | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sample/src/main/kotlin/com/chuckerteam/chucker/sample/ManualTransactionTask.kt diff --git a/sample/src/main/kotlin/com/chuckerteam/chucker/sample/ManualTransactionTask.kt b/sample/src/main/kotlin/com/chuckerteam/chucker/sample/ManualTransactionTask.kt new file mode 100644 index 000000000..2dffda1fe --- /dev/null +++ b/sample/src/main/kotlin/com/chuckerteam/chucker/sample/ManualTransactionTask.kt @@ -0,0 +1,34 @@ +package com.chuckerteam.chucker.sample + +import com.chuckerteam.chucker.api.ChuckerCollector +import com.chuckerteam.chucker.api.entity.ManualHttpTransaction + +class ManualTransactionTask( + private val chuckerCollector: ChuckerCollector +) : HttpTask { + + override fun run() { + val responseBody = "Some Custom response body!" + chuckerCollector.saveTransaction( + transaction = ManualHttpTransaction( + requestDate = System.currentTimeMillis(), + responseDate = System.currentTimeMillis(), + protocol = "CustomProtocol", + method = "Custom Method", + responseContentType = "text/html; charset=UTF-8", + requestContentType = "text/html; charset=UTF-8", + scheme = "http", + isResponseBodyEncoded = false, + tookMs = 1000, + responseCode = 200, + responseMessage = "OK", + responseBody = responseBody, + isRequestBodyEncoded = false, + responsePayloadSize = responseBody.toByteArray().size.toLong(), + host = "Custom HOST", + url = "http://customUrl.com/", + path = "/custom", + ) + ) + } +} From 08245bc7a1ef661b35c20a29905cbd8d5cb01a13 Mon Sep 17 00:00:00 2001 From: ali abdolahi Date: Wed, 20 Jul 2022 18:33:04 +0430 Subject: [PATCH 6/8] add manual transaction task to all current task --- .../chucker/sample/MainActivity.kt | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/sample/src/main/kotlin/com/chuckerteam/chucker/sample/MainActivity.kt b/sample/src/main/kotlin/com/chuckerteam/chucker/sample/MainActivity.kt index 8bf3b8146..7f7aa8c02 100644 --- a/sample/src/main/kotlin/com/chuckerteam/chucker/sample/MainActivity.kt +++ b/sample/src/main/kotlin/com/chuckerteam/chucker/sample/MainActivity.kt @@ -6,6 +6,8 @@ import android.text.method.LinkMovementMethod import android.view.View import androidx.appcompat.app.AppCompatActivity import com.chuckerteam.chucker.api.Chucker +import com.chuckerteam.chucker.api.ChuckerCollector +import com.chuckerteam.chucker.api.RetentionManager import com.chuckerteam.chucker.sample.databinding.ActivityMainSampleBinding private val interceptorTypeSelector = InterceptorTypeSelector() @@ -14,12 +16,25 @@ class MainActivity : AppCompatActivity() { private lateinit var mainBinding: ActivityMainSampleBinding + private val chuckerCollector: ChuckerCollector by lazy { + ChuckerCollector( + context = applicationContext, + showNotification = true, + retentionPeriod = RetentionManager.Period.ONE_HOUR + ) + } + private val client by lazy { - createOkHttpClient(applicationContext, interceptorTypeSelector) + createOkHttpClient(applicationContext, interceptorTypeSelector, chuckerCollector) } private val httpTasks by lazy { - listOf(HttpBinHttpTask(client), DummyImageHttpTask(client), PostmanEchoHttpTask(client)) + listOf( + HttpBinHttpTask(client), + DummyImageHttpTask(client), + PostmanEchoHttpTask(client), + ManualTransactionTask(chuckerCollector) + ) } override fun onCreate(savedInstanceState: Bundle?) { From 25a92d5415fff02d84ea2b2c8d5e138c28f2d4a4 Mon Sep 17 00:00:00 2001 From: ali abdolahi Date: Wed, 20 Jul 2022 18:40:37 +0430 Subject: [PATCH 7/8] Update CHANGELOG.md and add manual transaction to the unrelased part --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4c8660cd..030871c12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ This file follows [Keepachangelog](https://keepachangelog.com/) format. Please add your entries according to this format. ## Unreleased +* Added ability to log manual transactions. In order to do this call ChuckerCollector#saveTransaction(transaction: ManualHttpTransaction) method and pass ManualHttpTransaction entity to it. ### Added * Decoding of request and response bodies can now be customized. In order to do this a `BodyDecoder` interface needs to be implemented and installed in the `ChuckerInterceptor` via `ChuckerInterceptor.addBinaryDecoder(decoder)` method. Decoded bodies are then displayed in the Chucker UI. From 509ed8f633f21084c954fde6767be7009826e79e Mon Sep 17 00:00:00 2001 From: ali abdolahi Date: Wed, 3 Aug 2022 15:44:18 +0430 Subject: [PATCH 8/8] update api files to match new api changes --- library-no-op/api/library-no-op.api | 93 +++++++++++++++++++++++++++++ library/api/library.api | 93 +++++++++++++++++++++++++++++ 2 files changed, 186 insertions(+) diff --git a/library-no-op/api/library-no-op.api b/library-no-op/api/library-no-op.api index 5804b3a1a..aaf674a80 100644 --- a/library-no-op/api/library-no-op.api +++ b/library-no-op/api/library-no-op.api @@ -16,6 +16,7 @@ public final class com/chuckerteam/chucker/api/ChuckerCollector { public fun (Landroid/content/Context;ZLcom/chuckerteam/chucker/api/RetentionManager$Period;)V public synthetic fun (Landroid/content/Context;ZLcom/chuckerteam/chucker/api/RetentionManager$Period;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun getShowNotification ()Z + public final fun saveTransaction (Lcom/chuckerteam/chucker/api/entity/ManualHttpTransaction;)V public final fun setShowNotification (Z)V } @@ -54,3 +55,95 @@ public final class com/chuckerteam/chucker/api/RetentionManager$Period : java/la public static fun values ()[Lcom/chuckerteam/chucker/api/RetentionManager$Period; } +public final class com/chuckerteam/chucker/api/entity/ManualHttpTransaction { + public fun ()V + public fun (Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Z[B)V + public synthetic fun (Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Z[BILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/Long; + public final fun component10 ()Ljava/lang/String; + public final fun component11 ()Ljava/lang/String; + public final fun component12 ()Ljava/lang/Long; + public final fun component13 ()Ljava/lang/String; + public final fun component14 ()Ljava/lang/String; + public final fun component15 ()Ljava/lang/Long; + public final fun component16 ()Ljava/lang/String; + public final fun component17 ()Z + public final fun component18 ()Ljava/lang/Integer; + public final fun component19 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/Long; + public final fun component20 ()Ljava/lang/String; + public final fun component21 ()Ljava/lang/Long; + public final fun component22 ()Ljava/lang/String; + public final fun component23 ()Ljava/lang/String; + public final fun component24 ()Ljava/lang/Long; + public final fun component25 ()Ljava/lang/String; + public final fun component26 ()Z + public final fun component27 ()[B + public final fun component3 ()Ljava/lang/Long; + public final fun component4 ()Ljava/lang/String; + public final fun component5 ()Ljava/lang/String; + public final fun component6 ()Ljava/lang/String; + public final fun component7 ()Ljava/lang/String; + public final fun component8 ()Ljava/lang/String; + public final fun component9 ()Ljava/lang/String; + public final fun copy (Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Z[B)Lcom/chuckerteam/chucker/api/entity/ManualHttpTransaction; + public static synthetic fun copy$default (Lcom/chuckerteam/chucker/api/entity/ManualHttpTransaction;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Z[BILjava/lang/Object;)Lcom/chuckerteam/chucker/api/entity/ManualHttpTransaction; + public fun equals (Ljava/lang/Object;)Z + public final fun getError ()Ljava/lang/String; + public final fun getHost ()Ljava/lang/String; + public final fun getMethod ()Ljava/lang/String; + public final fun getPath ()Ljava/lang/String; + public final fun getProtocol ()Ljava/lang/String; + public final fun getRequestBody ()Ljava/lang/String; + public final fun getRequestContentType ()Ljava/lang/String; + public final fun getRequestDate ()Ljava/lang/Long; + public final fun getRequestHeaders ()Ljava/lang/String; + public final fun getRequestHeadersSize ()Ljava/lang/Long; + public final fun getRequestPayloadSize ()Ljava/lang/Long; + public final fun getResponseBody ()Ljava/lang/String; + public final fun getResponseCipherSuite ()Ljava/lang/String; + public final fun getResponseCode ()Ljava/lang/Integer; + public final fun getResponseContentType ()Ljava/lang/String; + public final fun getResponseDate ()Ljava/lang/Long; + public final fun getResponseHeaders ()Ljava/lang/String; + public final fun getResponseHeadersSize ()Ljava/lang/Long; + public final fun getResponseImageData ()[B + public final fun getResponseMessage ()Ljava/lang/String; + public final fun getResponsePayloadSize ()Ljava/lang/Long; + public final fun getResponseTlsVersion ()Ljava/lang/String; + public final fun getScheme ()Ljava/lang/String; + public final fun getTookMs ()Ljava/lang/Long; + public final fun getUrl ()Ljava/lang/String; + public fun hashCode ()I + public final fun isRequestBodyEncoded ()Z + public final fun isResponseBodyEncoded ()Z + public final fun setError (Ljava/lang/String;)V + public final fun setHost (Ljava/lang/String;)V + public final fun setMethod (Ljava/lang/String;)V + public final fun setPath (Ljava/lang/String;)V + public final fun setProtocol (Ljava/lang/String;)V + public final fun setRequestBody (Ljava/lang/String;)V + public final fun setRequestBodyEncoded (Z)V + public final fun setRequestContentType (Ljava/lang/String;)V + public final fun setRequestDate (Ljava/lang/Long;)V + public final fun setRequestHeaders (Ljava/lang/String;)V + public final fun setRequestHeadersSize (Ljava/lang/Long;)V + public final fun setRequestPayloadSize (Ljava/lang/Long;)V + public final fun setResponseBody (Ljava/lang/String;)V + public final fun setResponseBodyEncoded (Z)V + public final fun setResponseCipherSuite (Ljava/lang/String;)V + public final fun setResponseCode (Ljava/lang/Integer;)V + public final fun setResponseContentType (Ljava/lang/String;)V + public final fun setResponseDate (Ljava/lang/Long;)V + public final fun setResponseHeaders (Ljava/lang/String;)V + public final fun setResponseHeadersSize (Ljava/lang/Long;)V + public final fun setResponseImageData ([B)V + public final fun setResponseMessage (Ljava/lang/String;)V + public final fun setResponsePayloadSize (Ljava/lang/Long;)V + public final fun setResponseTlsVersion (Ljava/lang/String;)V + public final fun setScheme (Ljava/lang/String;)V + public final fun setTookMs (Ljava/lang/Long;)V + public final fun setUrl (Ljava/lang/String;)V + public fun toString ()Ljava/lang/String; +} + diff --git a/library/api/library.api b/library/api/library.api index 5ba5ec7f3..a8ab19c17 100644 --- a/library/api/library.api +++ b/library/api/library.api @@ -16,6 +16,7 @@ public final class com/chuckerteam/chucker/api/ChuckerCollector { public fun (Landroid/content/Context;ZLcom/chuckerteam/chucker/api/RetentionManager$Period;)V public synthetic fun (Landroid/content/Context;ZLcom/chuckerteam/chucker/api/RetentionManager$Period;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun getShowNotification ()Z + public final fun saveTransaction (Lcom/chuckerteam/chucker/api/entity/ManualHttpTransaction;)V public final fun setShowNotification (Z)V } @@ -53,3 +54,95 @@ public final class com/chuckerteam/chucker/api/RetentionManager$Period : java/la public static fun values ()[Lcom/chuckerteam/chucker/api/RetentionManager$Period; } +public final class com/chuckerteam/chucker/api/entity/ManualHttpTransaction { + public fun ()V + public fun (Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Z[B)V + public synthetic fun (Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Z[BILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/Long; + public final fun component10 ()Ljava/lang/String; + public final fun component11 ()Ljava/lang/String; + public final fun component12 ()Ljava/lang/Long; + public final fun component13 ()Ljava/lang/String; + public final fun component14 ()Ljava/lang/String; + public final fun component15 ()Ljava/lang/Long; + public final fun component16 ()Ljava/lang/String; + public final fun component17 ()Z + public final fun component18 ()Ljava/lang/Integer; + public final fun component19 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/Long; + public final fun component20 ()Ljava/lang/String; + public final fun component21 ()Ljava/lang/Long; + public final fun component22 ()Ljava/lang/String; + public final fun component23 ()Ljava/lang/String; + public final fun component24 ()Ljava/lang/Long; + public final fun component25 ()Ljava/lang/String; + public final fun component26 ()Z + public final fun component27 ()[B + public final fun component3 ()Ljava/lang/Long; + public final fun component4 ()Ljava/lang/String; + public final fun component5 ()Ljava/lang/String; + public final fun component6 ()Ljava/lang/String; + public final fun component7 ()Ljava/lang/String; + public final fun component8 ()Ljava/lang/String; + public final fun component9 ()Ljava/lang/String; + public final fun copy (Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Z[B)Lcom/chuckerteam/chucker/api/entity/ManualHttpTransaction; + public static synthetic fun copy$default (Lcom/chuckerteam/chucker/api/entity/ManualHttpTransaction;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Z[BILjava/lang/Object;)Lcom/chuckerteam/chucker/api/entity/ManualHttpTransaction; + public fun equals (Ljava/lang/Object;)Z + public final fun getError ()Ljava/lang/String; + public final fun getHost ()Ljava/lang/String; + public final fun getMethod ()Ljava/lang/String; + public final fun getPath ()Ljava/lang/String; + public final fun getProtocol ()Ljava/lang/String; + public final fun getRequestBody ()Ljava/lang/String; + public final fun getRequestContentType ()Ljava/lang/String; + public final fun getRequestDate ()Ljava/lang/Long; + public final fun getRequestHeaders ()Ljava/lang/String; + public final fun getRequestHeadersSize ()Ljava/lang/Long; + public final fun getRequestPayloadSize ()Ljava/lang/Long; + public final fun getResponseBody ()Ljava/lang/String; + public final fun getResponseCipherSuite ()Ljava/lang/String; + public final fun getResponseCode ()Ljava/lang/Integer; + public final fun getResponseContentType ()Ljava/lang/String; + public final fun getResponseDate ()Ljava/lang/Long; + public final fun getResponseHeaders ()Ljava/lang/String; + public final fun getResponseHeadersSize ()Ljava/lang/Long; + public final fun getResponseImageData ()[B + public final fun getResponseMessage ()Ljava/lang/String; + public final fun getResponsePayloadSize ()Ljava/lang/Long; + public final fun getResponseTlsVersion ()Ljava/lang/String; + public final fun getScheme ()Ljava/lang/String; + public final fun getTookMs ()Ljava/lang/Long; + public final fun getUrl ()Ljava/lang/String; + public fun hashCode ()I + public final fun isRequestBodyEncoded ()Z + public final fun isResponseBodyEncoded ()Z + public final fun setError (Ljava/lang/String;)V + public final fun setHost (Ljava/lang/String;)V + public final fun setMethod (Ljava/lang/String;)V + public final fun setPath (Ljava/lang/String;)V + public final fun setProtocol (Ljava/lang/String;)V + public final fun setRequestBody (Ljava/lang/String;)V + public final fun setRequestBodyEncoded (Z)V + public final fun setRequestContentType (Ljava/lang/String;)V + public final fun setRequestDate (Ljava/lang/Long;)V + public final fun setRequestHeaders (Ljava/lang/String;)V + public final fun setRequestHeadersSize (Ljava/lang/Long;)V + public final fun setRequestPayloadSize (Ljava/lang/Long;)V + public final fun setResponseBody (Ljava/lang/String;)V + public final fun setResponseBodyEncoded (Z)V + public final fun setResponseCipherSuite (Ljava/lang/String;)V + public final fun setResponseCode (Ljava/lang/Integer;)V + public final fun setResponseContentType (Ljava/lang/String;)V + public final fun setResponseDate (Ljava/lang/Long;)V + public final fun setResponseHeaders (Ljava/lang/String;)V + public final fun setResponseHeadersSize (Ljava/lang/Long;)V + public final fun setResponseImageData ([B)V + public final fun setResponseMessage (Ljava/lang/String;)V + public final fun setResponsePayloadSize (Ljava/lang/Long;)V + public final fun setResponseTlsVersion (Ljava/lang/String;)V + public final fun setScheme (Ljava/lang/String;)V + public final fun setTookMs (Ljava/lang/Long;)V + public final fun setUrl (Ljava/lang/String;)V + public fun toString ()Ljava/lang/String; +} +