Book Image

SOA Patterns with BizTalk Server 2013 and Microsoft Azure

By : Richard Seroter, Mark T Brimble, Coen J Dijkgraaf, Mahindra Morar, Mark Brimble, Colin Dijkgraaf, Johann Cooper
Book Image

SOA Patterns with BizTalk Server 2013 and Microsoft Azure

By: Richard Seroter, Mark T Brimble, Coen J Dijkgraaf, Mahindra Morar, Mark Brimble, Colin Dijkgraaf, Johann Cooper

Overview of this book

Table of Contents (21 chapters)
SOA Patterns with BizTalk Server 2013 and Microsoft Azure Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Resource representation


Resource representation defines the data format of the response. The response message may be in any one of the following formats:

  • Plain text

  • Form-encoding

  • XML

  • HTML

  • JSON

  • Any other Internet media type, provided that it is a valid hypertext standard

You can specify the format of the delivery content by setting the Content-Type header value in the request headers to the service. REST APIs commonly use either the application/json or application/xml media type.

Here is an example of a header request for JSON:

Content-Type: application/json
Host: localhost:65437
Content-Length: 69

Now, we'll see an example for XML:

Content-Type: application/xml
Host: localhost:65437
Content-Length: 69

Tip

Remember to use XML to transfer documents and JSON for data transfers.