using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Nuclex.Networking.Gallery3.Requests {
/// Creates requests to read or write resources
///
/// This interface enables unit tests to mock the requests instead of depending
/// on an actual web server to validate request-generating code. It also
/// provides a way for the user to set up requests using HTTP authentication
/// or adding extra headers to a request.
///
public interface IRequestFactory {
/// Creates a new request for the specified resource
/// Resource the request will access
/// The new request
///
/// The parameter contains an URI relative
/// to a base URI the request factory is responsible for storing. For
/// example, if a factory serves 'http://mygallery.com/' and a request is
/// created for the resource 'rest/item/1', the request should query for
/// 'http://mygallery.com/rest/item/1'.
///
IRequest CreateRequest(string resourceUrl);
/*
/// Creates a new request with JSON-encoded data appended
/// Resource the request will access
///
/// Type of the data that will be attached as JSON
///
/// The data that will be attached in JSON format
/// The new request
///
/// The parameter contains an URI relative
/// to a base URI the request factory is responsible for storing. For
/// example, if a factory serves 'http://mygallery.com/' and a request is
/// created for the resource 'rest/item/1', the request should query for
/// 'http://mygallery.com/rest/item/1'.
///
IRequest CreateJsonRequest(
string resourceUrl, AttachmentType attachment
);
*/
}
} // namespace Nuclex.Networking.Gallery3.Requests