Script Sample 'Get Store Product Data' won't work?
kabexef
Posts: 76
Hi,
I tried the script sample 'Get Store Product Data' (http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/metadata/get_store_product_data/start) but won't get any reasonable result. The only responseData I received is '"{\"error\":\"OK (7991690983107231706)\"}".
If I try the url within firefox (e.g. https://www.daz3d.com/dazApi/slab/22740) I'll get the full response with a lot of data.
How can I keep the script running?
Comments
I would suspect some kind of redirect is not working since the store update.
Add the lines:
// Set the Quary String for the request
oHttp.setQueryString( "" );
under the
// Set the content type for the request
oHttp.setContentType( "application/json" );
and it should be fine ;-)
This works because the default string is being incorrectly initialised. Putting in an empty string clears that portion of the generated URL. Watch the change log for a full fix to the issue.
Thanks, I'll try it next time.