DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Send A Bad Request To A Web Service For Testing Garbage Resilience

10.12.2007
| 2497 views |
  • submit to reddit
        // description of your code here

def link = "http://localhost:8080/webservices/MyWebService"

def url = new URL(link)

def conn = url.openConnection()
conn.doOutput = true

conn.outputStream << "BROL"

conn.inputStream.eachLine { println it }