File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
pluto-plugins/plugins/network/core/lib/src/main/java/com/pluto/plugins/network/intercept Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class NetworkData {
2525 private fun parseGraphqlData (): GraphqlData ? {
2626 if (method != " POST" ||
2727 body == null ||
28- ! body.isLikelyJson
28+ ! body.isJson
2929 ) return null
3030 val json = runCatching { JSONObject (body!! .body.toString()) }.getOrNull() ? : return null
3131 val query = json.optString(" query" ) ? : return null
@@ -69,7 +69,7 @@ class NetworkData {
6969 internal val isBinary: Boolean = BINARY_MEDIA_TYPES .contains(mediaType)
7070 val sizeInBytes: Long = body.length.toLong()
7171 internal val mediaTypeFull: String = " $mediaType /$mediaSubtype "
72- val isLikelyJson get() = ! isBinary && body.startsWith( ' { ' )
72+ val isJson get() = mediaTypeFull == " application/json "
7373 }
7474
7575 companion object {
You can’t perform that action at this time.
0 commit comments