Amido.Testing.Http.RestClient.AddContentType C# (CSharp) Method

AddContentType() public method

Helper method for adding a content type to the request.
public AddContentType ( ContentType contentType ) : IRestClient
contentType ContentType The .
return IRestClient
        public virtual IRestClient AddContentType(ContentType contentType)
        {
            switch (contentType)
            {
                case ContentType.Json:
                    contentTypeString = "application/json";
                    break;
                case ContentType.Xml:
                    contentTypeString = "text/xml";
                    break;
                default:
                    contentTypeString = "application/x-www-form-urlencoded";
                    break;
            }
            return this;
        }