diff --git a/vars/drafter.groovy b/vars/drafter.groovy index f110029..00d4b26 100644 --- a/vars/drafter.groovy +++ b/vars/drafter.groovy @@ -59,12 +59,8 @@ echo "Adding data to draftset ${id}" String url = "${baseUrl}/v1/draftset/${id}/data" if (graph) { - if (type.contains('charset')) { // workaroud odd issue with endpoint not parsing params if charset - url = url + "?graph=${graph}" - } else { - String encGraph = java.net.URLEncoder.encode(graph, "UTF-8") - url = url + "?graph=${encGraph}" - } + String encGraph = java.net.URLEncoder.encode(graph, "UTF-8") + url = url + "?graph=${encGraph}" } def response = httpRequest(acceptType: 'APPLICATION_JSON', authentication: credentials, diff --git a/vars/runPipeline.groovy b/vars/runPipeline.groovy index 0abd20f..5d0080f 100644 --- a/vars/runPipeline.groovy +++ b/vars/runPipeline.groovy @@ -21,7 +21,8 @@ body += "--${boundary}--\r\n" def importRequest = httpRequest(acceptType: 'APPLICATION_JSON', authentication: credentials, httpMode: 'POST', url: pipelineUrl, requestBody: body, - customHeaders: [[name: 'Content-Type', value: 'multipart/form-data;boundary="' + boundary + '"']]) + customHeaders: [[name: 'Content-Type', + value: 'multipart/form-data;charset=UTF-8;boundary="' + boundary + '"']]) if (importRequest.status == 202) { def importJob = readJSON(text: importRequest.content) String jobUrl = new java.net.URI(pipelineUrl).resolve(importJob['finished-job']) as String