Download an image from a URL?

后端 未结 3 2045
清歌不尽
清歌不尽 2020-12-15 04:28

I am trying to use HTTP::get to download an image of a Google chart from a URL I created.

This was my first attempt:

failures_url  = [title, type, d         


        
3条回答
  •  感情败类
    2020-12-15 05:27

    Your original version did not have the parameter name for each parameter, just the data. For example, on the title, you cannot just submit "Builds+in+the+last+12+months", but instead it must be "chtt=Builds+in+the+last+12+months".

    Try this:

    failures_url  = ["title="+title, "type="+type, "data="+data, "size="+size, "colors="+colors, "labels="+labels].join("&")
    

提交回复
热议问题