0
I am developing a client who consumes a webservice, all POST methods are ok.
Has a GET method that should return an HTML page for client registration.
in this method, it is necessary to set the header:
content-type:"application/json" api-token: {token}
i can call the method and open the page in a webbrowser, but with a lot of CSS and JS errors, the page formatting gets wrong and the buttons don’t work.
I would like to open this page in an external browser (Chrome, firefox, even iexplorer) however, when calling the URL, always returns me that the token was not informed.
You can change something in C# to open the page correctly in Webbrowser?
It is possible to open the external browser, passing beyond the URL, the token that should go in the header?
UPDATE:
What I’ve already done:
1-
string html = LinkedFarma.CadastrarCliente(); //Retorna o HTML do método GET
webBrowser1.DocumentText = html;
Upshot: Does not load CSS and JS (obvious)
2-
string headers = "api-token: "+Configuracao.Token+"\r\n";
headers += "content-type: application/json";
webBrowser1.Navigate(Configuracao.UrlCadastrarCliente, null, null, headers);
Upshot: It works, but the page gets errors, the buttons don’t work CSS is not loaded completely.
3-
I already created a page in PHP, which would receive the Token as a parameter and would make the request redirecting the page, but without success as well. (I ventured into PHP because I have no practice)
Thanks for your attention, then, as it is only an app that will integrate two systems, we prefer not to use external components, usually are several dlls that I have to reference, conseguemente, several dlls that I will have to distribute together with the application. About open in external browser, it’s just a page, quiet. Again, thank you.
– Rovann Linhalis