-
Notifications
You must be signed in to change notification settings - Fork 0
Browser.POST()
cTrader GURU edited this page Jul 23, 2018
·
3 revisions
Richiesta POST per pagine web, restituisce il source e tiene conto dei redirect e del protocollo di sicurezza.
cTrader_GURU.Web.Browser.POST (string url, NameValueCollection data, bool nocache = false, string useragent = "cTrader GURU")
| Tipo | Parametro | Descrizione | Default |
|---|---|---|---|
| string | url | la pagina da richiedere | * |
| NameValueCollection | data | parametri POST | * |
| bool | nocache | richiede ogni volta una pagina nuova | # false |
| 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()
{
var data = new NameValueCollection();
data["username"] = "gUrU";
string homepage = Browser.POST( "https://ctrader.guru/", data );
Print( "Source --> {0}", homepage );
Stop();
}
}
}
Molto utile per leggere informazioni inerenti le news o altri dati finanziari.
cTrader_GURU
cTrader_GURU.Web
cTrader_GURU.Update
cTrader_GURU.Font