How to insert the Base64 string file in the http body?

Hi KS Team,

Am getting empty response when request payload with base64 string (Image to base64) which is stored in the global variable.
but i get response only if the base64 string inserted directly in the http body.

//Convert base64
File f = new File(‘C:/Users/…Data Files/Registration_Face/Male-Face06.jpg’)
FileInputStream fis = new FileInputStream(f)
byte byteArray = new byte[(int)f.length()]
fis.read(byteArray)
String imageString = new sun.misc.BASE64Encoder().encode(byteArray)
println(imageString)
GlobalVariable.glbbase64face = imageString

//Test case
request= WS.sendRequest(findTestObject(‘… Register Face Image’))
def responseResult = slurper.parseText(request.getResponseText())
def regBioid = responseResult.bioId
println(responseResult)

Please show how the Test Object … Register Face Image is defined. Does it have an appropriate reference to the GlobalVariable.glbbase64face?
`