Skip to content

Browser.GET()

cTrader GURU edited this page Jul 23, 2018 · 1 revision

Richiesta GET per pagine web, restituisce il source e tiene conto dei redirect e del protocollo di sicurezza.


cTrader_GURU.Web.Browser.GET (string url, bool nocache = true, string useragent = "cTrader GURU")


Tipo Parametro Descrizione Default
string url la pagina da richiedere *
bool nocache richiede ogni volta una pagina nuova # true
string useragent user-agent personalizzato # cTrader GURU

using System;
using cAlgo.API;
using cTrader_GURU.Web;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class TestDLL : Robot
    {

        protected override void OnStart()
        {

            string homepage = Browser.GET( "https://ctrader.guru/" );

            Print( "Source --> {0}", homepage );

            Stop();

        }

    }

}

Molto utile per leggere informazioni inerenti le news o altri dati finanziari.

Clone this wiki locally