'Groovy Script error: Unable to process url
I am actually trying to list the files available in artifactory url. But getting the error
groovy.json.JsonException: Unable to process url:
at ConsoleScript27.run(ConsoleScript27:4)
Caused by: java.io.IOException: Server returned HTTP response code: 505 for URL:
... 1 more
Here is the Code
import groovy.json.*
def mySlurper = new JsonSlurper().setType(JsonParserType.CHARACTER_SOURCE)
def latestUri = 'http://abc.star.com/artifactory/api/storage/third-party-installs/ABC Software/software/Java'
def pageUrl = mySlurper.parse(new URL(mySlurper.parse(new URL(latestUri)).get("uri"))).get("downloadUri")
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|