Ejemplo n.º 1
0
        public void PutUploadedStatus()
        {
            if (!uploaded)
            {
                UploadAsset();
            }
            clientinit();
            Status_response sr = new Status_response();

            sr.Status = "uploaded";
            Task <HttpResponseMessage> response = client.PutAsJsonAsync("/asset/" + asset_id, sr);

            Assert.IsTrue(response.Result.IsSuccessStatusCode);
            status = true;
        }
Ejemplo n.º 2
0
 public IActionResult Put(string id, [FromBody] Status_response sr)
 {
     try
     {
         var  r       = sets3tag(id, "Status", sr.Status);
         bool success = r.Result;
         if (success)
         {
             return(Ok());
         }
         else
         {
             return(BadRequest());
         }
     }
     catch (Exception)
     {
         return(BadRequest("no body"));
     }
 }