Chapter 8. Working with Web Services in Groovy

In this chapter, we will cover:

  • Downloading content from the Internet
  • Executing an HTTP GET request
  • Executing an HTTP POST request
  • Constructing and modifying complex URLs
  • Issuing a REST request and parsing a response
  • Issuing a SOAP request and parsing a response
  • Consuming RSS and Atom feeds
  • Using basic authentication for web service security
  • Using OAuth for web service security

Introduction

The recipes collected in this chapter deal with the so called programmable web.

Today's applications consume data from a multitude of external sources. These sources are often accessed through HTTP and one of the two main methods for exchanging data over the web, SOAP and REST.

The first recipes describe how to execute simple ...

Get Groovy 2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.