Skip to content

Commit 6fc5579

Browse files
committed
add headers to http AtlasHttpClient.executeUpload
1 parent ff22722 commit 6fc5579

File tree

1 file changed

+5
-1
lines changed
  • kotlin-http-client/kotlin-http-client-atlas/src/main/kotlin/com/linkedplanet/kotlinhttpclient/atlas

1 file changed

+5
-1
lines changed

kotlin-http-client/kotlin-http-client-atlas/src/main/kotlin/com/linkedplanet/kotlinhttpclient/atlas/AtlasHttpClient.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,11 @@ class AtlasHttpClient(private val appLink: ApplicationLink) : BaseHttpClient() {
115115
val file = tempFileWithData(filename, inputStream)
116116
val filePart = RequestFilePart(mimeType, filename, file, "file")
117117
request.setFiles(listOf(filePart))
118-
118+
request.apply {
119+
setHeader("X-Atlassian-Token", "no-check")
120+
setHeader("Connection", "keep-alive")
121+
setHeader("Cache-Control", "no-cache")
122+
}
119123
request.execute(object : ApplicationLinkResponseHandler<Either<HttpDomainError, HttpResponse<InputStream>>> {
120124
override fun credentialsRequired(response: Response) = null
121125

0 commit comments

Comments
 (0)