github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/resource/api/download.go (about) 1 // Copyright 2016 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package api 5 6 import "net/http" 7 8 // NewHTTPDownloadRequest creates a new HTTP download request 9 // for the given resource. 10 // 11 // Intended for use on the client side. 12 func NewHTTPDownloadRequest(resourceName string) (*http.Request, error) { 13 return http.NewRequest("GET", "/resources/"+resourceName, nil) 14 }