if(args.mechs == null) { return "No data sent"; } var body = { }; var url = "https://api.averongame.com/v1/mechs/damage/" + currentPlayerId; var content = args.mechs.toString(); var httpMethod = "Post"; var contentType = "application/json"; // The pre-defined http object makes synchronous HTTP requests var response = http.request(url, httpMethod, content, contentType, headers); return response + " data: " + args.mechs.toString();; {"Message":"Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'AveronAPI.DTO.MechUpdateRequest' because the type requires a JSON object (e.g. {\"name\":\"value\"}) to deserialize correctly.\r\nTo fix this error either change the JSON to a JSON object (e.g. {\"name\":\"value\"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.\r\nPath '', line 1, position 1.| Request: [{\"critType\":0,\"weaponIndex\":-1,\"hits\":0,\"active\":true}],\"weapons\":[{\"weaponType\":\"Test Weapon 0\",\"location\":1,\"damage\":0,\"heat\":0,\"minRange\":0,\"shortRange\":0,\"mediumRange\":0,\"longRange\":0,\"ammoType\":\"Test Ammo Type 0\",\"activeFire\":false,\"weaponActive\":false,\"clusterWeapon\":false,\"clusterNumber\":0,\"baseToHit\":0},{\"weaponType\":\"Test Weapon 1\",\"location\":5,\"damage\":0,\"heat\":0,\"minRange\":0,\"shortRange\":0,\"mediumRange\":0,\"longRange\":0,\"ammoType\":\"Test Ammo Type 1\",\"activeFire\":false,\"weaponActive\":false,\"clusterWeapon\":false,\"clusterNumber\":0,\"baseToHit\":0}],\"ammos\":[{\"ammoType\":\"Test Ammo Type 0\",\"ammoCount\":0,\"capacity\":10,\"explosive\":false,\"location\":6},{\"ammoType\":\"Test Ammo Type 0\",\"ammoCount\":0,\"capacity\":10,\"explosive\":false,\"location\":8}]}]}"} data: {"mechs":[{"id":77,"mechClass":0,"name":"Test Mech 0","mechType":"","tonnage":0,"walkMP":0,"runMP":0,"jumpMP":0,"heat":0,"heatSinks":0,"doubleHeatSinks":false,"sensorRange":0,"leftArmArmor":0,"rightArmArmor":5,"leftTorsoArmor":5,"rightTorsoArmor":0,"centerTorsoArmor":5,"leftTorsoRearArmor":0,"rightTorsoRearArmor":0,"centerTorsoRearArmor":0,"headArmor":5,"leftLegArmor":0,"rightLegArmor":0,"leftArmInternal":2,"rightArmInternal":2,"leftTorsoInternal":2,"rightTorsoInternal":2,"centerTorsoInternal":2,"headInternal":2,"leftLegInternal":2,"rightLegInternal":2,"headCrit":[{"critType":0,"weaponIndex":-1,"hits":0,"active":true}],"centerTorsoCrit":[{"critType":0,"weaponIndex":-1,"hits":0,"active":true}],"rightTorsoCrit":[{"critType":0,"weaponIndex":-1,"hits":0,"active":true}],"leftTorsoCrit":[{"critType":0,"weaponIndex":-1,"hits":0,"active":true}],"rightArmCrit":[{"critType":0,"weaponIndex":-1,"hits":0,"active":true}],"leftArmCrit":[],"rightLegCrit":[{"critType":0,"weaponIndex":-1,"hits":0,"active":true}],"leftLegCrit":[{"critType":0,"weaponIndex":-1,"hits":0,"active":true}],"weapons":[{"weaponType":"Test Weapon 0","location":1,"damage":0,"heat":0,"minRange":0,"shortRange":0,"mediumRange":0,"longRange":0,"ammoType":"Test Ammo Type 0","activeFire":false,"weaponActive":false,"clusterWeapon":false,"clusterNumber":0,"baseToHit":0},{"weaponType":"Test Weapon 1","location":5,"damage":0,"heat":0,"minRange":0,"shortRange":0,"mediumRange":0,"longRange":0,"ammoType":"Test Ammo Type 1","activeFire":false,"weaponActive":false,"clusterWeapon":false,"clusterNumber":0,"baseToHit":0}],"ammos":[{"ammoType":"Test Ammo Type 0","ammoCount":0,"capacity":10,"explosive":false,"location":6},{"ammoType":"Test Ammo Type 0","ammoCount":0,"capacity":10,"explosive":false,"location":8}]}]} <br>