I'm developing a client that consumes a webservice, all POST methods are ok.
It has a GET method that should return an HTML page for customer registration.
In this method, you need to define 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 is wrong and the buttons do not work.
I would like to open this page in an external browser (chrome, firefox, even iexplorer) but when calling the URL, it always returns me that the token was not informed.
Is it possible to change something in C # to open the page correctly in WebBrowser?
Is it possible to open the external browser, passing beyond the URL, the token that should go in the header?
UPDATE:
What I've done:
1 -
string html = LinkedFarma.CadastrarCliente(); //Retorna o HTML do método GET
webBrowser1.DocumentText = html;
Result: 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);
Result: It works, however the page has errors, the buttons do not work the CSS is not loaded completely.
3 -
I have 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)