Skip to content

Load message body on demand #185

@andreasohlund

Description

@andreasohlund

SC now supports loading of message bodies

Particular/ServiceControl@2b7a6d9

This is the way it works. When querying for messages there will by a property called "body_url" returned:


body_url: "http://localhost:33333/api/messages/c143e4ee-1e35-827c-ded9-73d4a551563a/body"

To get the body just download the url as bytes eg:

using (var client = new WebClient())
{
     body = client.DownloadData(message.BodyUrl);
}


This will stream back the contents of the body. The returned content type will reflect that actual content type of the body: (XML in the below case)

Access-Control-Allow-Headers:Origin, X-Requested-With, Content-Type, Accept
Access-Control-Allow-Methods:POST, GET, PUT, DELETE, OPTIONS
Access-Control-Allow-Origin:*
Access-Control-Expose-Headers:ETag, Last-Modified, Link, Total-Count, X-Particular-Version
Cache-Control:private, max-age=0
Content-Encoding:gzip
Content-Type:text/xml
Date:Wed, 18 Dec 2013 20:05:26 GMT
Expires:Thu, 18 Dec 2014 20:05:26 GMT
Server:Microsoft-HTTPAPI/2.0
Transfer-Encoding:chunked
X-Particular-Version:0.8.0-unstable294

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions