Method: Pdfcrowd::HtmlToImageClient#convertUrlToStream

Defined in:
lib/pdfcrowd.rb

#convertUrlToStream(url, out_stream) ⇒ Object



2119
2120
2121
2122
2123
2124
2125
2126
# File 'lib/pdfcrowd.rb', line 2119

def convertUrlToStream(url, out_stream)
    unless /(?i)^https?:\/\/.*$/.match(url)
        raise Error.new(Pdfcrowd.create_invalid_value_message(url, "convertUrlToStream::url", "html-to-image", "Supported protocols are http:// and https://.", "convert_url_to_stream"), 470);
    end
    
    @fields['url'] = url
    @helper.post(@fields, @files, @raw_data, out_stream)
end