Groovy web console

subscribe to the feed Subscribe
to this


Published 3 months ago by SCV with tags encodebase64
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
def s = '<Request><input1>This is input 1 value</input1></Request>' 
String encoded = s.bytes.encodeBase64().toString()
println("Value of encoded:: "+ encoded)
byte[] decoded = encoded.decodeBase64()
println("Value of decoded:: "+ new String(decoded))