Hi!
I'm using C#, and have successfully uploaded images to Vuforia's cloud using the POST command.
However, when I try doing a PUT to "https://vws.vuforia.com/targets/{target_id}" (where "{target_id}" is replaced with the proper target id), I get a 404 error.
Essentially, I'm using the same code as the POST method, except switched to PUT and adding the "/{target_id}" to the WWW call, like so:
string host = "https://vws.vuforia.com"; string targetPath = "/targets"; string targetIDPath = "/" + targetID; ... WWW wwwRequest = new WWW(host + targetPath + targetIDPath, System.Text.Encoding.UTF8.GetBytes(jsonBody), headers);
I have also tried changing "/targets" to "/targets/{target_id}" for the signing string, but that didn't make a difference.
Where exactly should the target_id be used? Is there something else that is used for the PUT that is not used for the POST?
Side note: The image targets for the corresponding target IDs I've tried updating. are ACTIVE.
I'm having the same issue. I can make a GET request for the target summary report with /targets/{target_id}, but when using the same target id to make a PUT request, it fails with error code 404.
Could you post how you resolved the issue, please?
EDIT:
I found a solution. WWW seemed to not work, so i used UnityWebRequest instead.
create your request,
UnityWebRequest webRequest = UnityWebRequest.Put(serviceURI, System.Text.Encoding.UTF8.GetBytes(jsonPostObj));
set headers,
webRequest.SetRequestHeader("host", url);
webRequest.SetRequestHeader("date", date);
webRequest.SetRequestHeader("content-type", contentType);
webRequest.SetRequestHeader("authorization", string.Format("VWS {0}:{1}", access_key, signature));
then send the request,
webRequest.SendWebRequest();
works like a charm.