Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting result of a task
Message
 
 
À
21/11/2016 07:12:41
Information générale
Forum:
ASP.NET
Catégorie:
Common Language Runtime
Versions des environnements
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Divers
Thread ID:
01643645
Message ID:
01643750
Vues:
24
>Did you configure for https OK.
>
>The request header is being displayed in your screen shot (on the Headers tab). Other tabs will give you other views of the request. Looking at the response should also give you detail of the response.
>You can filter which requests are shown to make it easier to identify those of interest.

I didn't configure for https - it was asking me about certificate and I am not sure I should accept it - do you think I should go ahead and accept everything?

Also, do you think I should add anything extra to my headers (say, specify no-cache, etc.)?

Here is what I have right now:
private void SetRequestHeaders(string tcHost, string tcUserName, string tcPassword, int tnTimeout, int tnRetries)
        {
            client.DefaultRequestHeaders.Accept.Clear();
            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
            client.BaseAddress = new Uri(tcHost);
            client.DefaultRequestHeaders.Authorization =
                        new AuthenticationHeaderValue(
        "Basic",
        Convert.ToBase64String(
            System.Text.ASCIIEncoding.ASCII.GetBytes(
                string.Format("{0}:{1}", tcUserName, tcPassword))));

            client.DefaultRequestHeaders.CacheControl = new CacheControlHeaderValue() { MaxAge = TimeSpan.Zero };
            client.Timeout = TimeSpan.FromSeconds( tnTimeout);
        }
just added a line about CacheControl.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform