C# Class HttpMock.ResponseBuilder

Exibir arquivo Open project: hibri/HttpMock Class Usage Examples

Public Methods

Method Description
AddHeader ( string header, string headerValue ) : void
BuildBody ( string>.IDictionary headers ) : IDataProducer
BuildHeaders ( ) : Kayak.Http.HttpResponseHead
Return ( Func body ) : ResponseBuilder
Return ( string body ) : ResponseBuilder
WithContentType ( string contentType ) : void
WithFile ( string pathToFile ) : void
WithFileRange ( string pathToFile, int from, int to ) : void
WithStatus ( HttpStatusCode httpStatusCode ) : void

Method Details

AddHeader() public method

public AddHeader ( string header, string headerValue ) : void
header string
headerValue string
return void

BuildBody() public method

public BuildBody ( string>.IDictionary headers ) : IDataProducer
headers string>.IDictionary
return IDataProducer

BuildHeaders() public method

public BuildHeaders ( ) : Kayak.Http.HttpResponseHead
return Kayak.Http.HttpResponseHead

Return() public method

public Return ( Func body ) : ResponseBuilder
body Func
return ResponseBuilder

Return() public method

public Return ( string body ) : ResponseBuilder
body string
return ResponseBuilder

WithContentType() public method

public WithContentType ( string contentType ) : void
contentType string
return void

WithFile() public method

public WithFile ( string pathToFile ) : void
pathToFile string
return void

WithFileRange() public method

public WithFileRange ( string pathToFile, int from, int to ) : void
pathToFile string
from int
to int
return void

WithStatus() public method

public WithStatus ( HttpStatusCode httpStatusCode ) : void
httpStatusCode HttpStatusCode
return void