Made sure optional server parameters are included.

This commit is contained in:
Erik C. Thauvin 2019-09-19 12:31:09 -07:00
parent 66fdd46fd8
commit acac309c35

View file

@ -456,7 +456,7 @@ open class Akismet(apiKey: String, blog: String) {
httpStatusCode = result.code httpStatusCode = result.code
proTip = result.header("x-akismet-pro-tip", "").toString() proTip = result.header("x-akismet-pro-tip", "").toString()
error = result.header("x-akismet-error", "").toString() error = result.header("x-akismet-error", "").toString()
degugHelp = result.header("X-akismet-debug-help", "").toString() degugHelp = result.header("x-akismet-debug-help", "").toString()
val body = result.body?.string() val body = result.body?.string()
if (body != null) { if (body != null) {
val response = body.trim() val response = body.trim()
@ -495,7 +495,7 @@ open class Akismet(apiKey: String, blog: String) {
} }
} }
if (other.isEmpty()) { if (other.isNotEmpty()) {
params.putAll(other) params.putAll(other)
} }