What is my code.
Now I need to SEND the cookie to the host, but I can not find a solution.
def get_network_file(url=nil) begin http = Net::HTTP.new( @service_server, 80 ) resp, data = http.get( url, { "Accept-Language" => @locale } ) if resp.code.to_i != 200 RAILS_DEFAULT_LOGGER.error "*** return code != 200. code = #{resp.code}" return "" end rescue Exception => exc RAILS_DEFAULT_LOGGER.error "*** message --> #{exc.message}" return "" end return data end end
Juanin
source share