-
Notifications
You must be signed in to change notification settings - Fork 53
RestClient
Scott Offen edited this page Nov 12, 2014
·
6 revisions
Grapevine.Client.RESTClient
Represents a server exposing resources to interact with.
A RESTClient takes only one parameter: the base URL. All requests sent will use this as the base of their resource path.
var client = new RESTClient("localhost:1234");Use the Execute method to send a Grapevine.Client.RESTRequest to remote server the client is referencing and get a Grapevine.Client.RESTResponse.
// sends a GET request to http://localhost:1234/resource/path
RESTResponse response = client.Execute(new RESTRequest("/resource/path"));Get the base URL value passed to the constructor.
Cookies : CookieContainer
Get and/or otherwise interact with the CookieContainer for this client. All cookies are sent with each request, and the container is updated with cookies from the response.
Credentials : NetworkCredential
Get or set the credentials to be used when interacting with this client. If no credentials are provided, none are sent.