예제 #1
0
        T WriteValueInternal <T>(Identifier identifier, string value, Func <Method, string, string, string, string, HttpStatusCode[], T> action)
        {
            string contentType = Options.ContentType;
            string resource    = ResourceBuilder.BuildSingleValueAccess(identifier);
            string content     = Converter.ConvertCell(new Cell(identifier, value));

            return(action(Method.POST, resource, contentType, contentType, content, new[] { HttpStatusCode.OK }));
        }
예제 #2
0
        /// <summary>
        ///   Writes the value to HBase using the identifier.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="value">The value.</param>
        public virtual void WriteValue(Identifier identifier, string value)
        {
            string        contentType = Options.ContentType;
            string        resource    = ResourceBuilder.BuildSingleValueAccess(identifier);
            string        content     = Converter.ConvertCell(new Cell(identifier, value));
            IRestResponse response    = SendRequest(Method.POST, resource, contentType, contentType, content);

            ErrorProvider.ThrowIfStatusMismatch(response, HttpStatusCode.OK);
        }