Re: Doubt using the REST method: "/v2/resource_match"
Juan Antonio BreƱa Moral <bren at juanantonio.info...>
Currently, CC returns "[ ]" for this structure:
[ { fn: 'index.html', size: 1482, sha1: '59f1e65c3576dfc0bf839d1822e644644a80c2fb' }, { fn: 'manifest.yml', size: 207, sha1: 'dce3b3949eb4c28c4a01cfdbe614e6de16d204bb' } ] [] If I send the response: [] in the method upload: http://apidocs.cloudfoundry.org/214/apps/uploads_the_bits_for_an_app.html I receive this answer: 400 { code: 160001, description: 'The app upload is invalid: invalid :resources', error_code: 'CF-AppBitsUploadInvalid' } What is right format for [] if CC returns this value? In node, I make this request: request({ method:'PUT', uri: url, auth:{bearer:access_token}, formData:{ async:'true', resources: JSON.stringify("[]"), <-- QUESTION application:fs.createReadStream("./StaticWebsite_HelloWorld.zip") }, json:true } Many thanks in advance. Juan Antonio |
|