Closed javaConductor closed 9 years ago
def userAgent = requestHeader("User-Agent") def acceptList = requestHeaders("Accept")
responseHeader "Content-Type", "plain/text" responseHeaders "Content-Type", ["plain/text"] def contentType = responseHeader("Content-Type")
Also add accepts(String mime) which returns true if 'mime' is a value of the responseHeader 'Accepts'
done.
Request
def userAgent = requestHeader("User-Agent") def acceptList = requestHeaders("Accept")
Response
responseHeader "Content-Type", "plain/text" responseHeaders "Content-Type", ["plain/text"] def contentType = responseHeader("Content-Type")