Post() public method

public Post ( string method, Uri uri, string properties ) : RequestResult
method string
uri System.Uri
properties string
return RequestResult
Exemplo n.º 1
0
        internal Index Create(string indexName)
        {
            JObject indexNameJson = new JObject();

            indexNameJson.Add("name", new JValue(indexName));

            Index index = new Index();

            index.SetLocation(UriHelper.ConcatUri(GraphEnvironment.GetBaseUri(), "db/data/index/node/" + indexName));
            var response = _graphRequest.Post(RequestType.POST, UriHelper.ConcatUri(GraphEnvironment.GetBaseUri(), "db/data/index/node/"), indexNameJson.ToString());

            //Console.WriteLine(response.GetResponseData());
            return(index);
        }
Exemplo n.º 2
0
 public virtual void Delete(BaseEntity entity)
 {
     try
     {
         _graphRequest.Post(RequestType.DELETE, entity.GetLocation(), null);
     }
     catch (Exception ex)
     {
         if (entity.GetType() == typeof(Node))
         {
             throw new Exceptions.NodeDeleteException((Node)entity);
         }
         else
         {
             throw;
         }
     }
 }