Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6190087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:31:26+00:00 2026-05-24T02:31:26+00:00

I tried to connect to a HTTPS page. In C# i can write a

  • 0

I tried to connect to a HTTPS page. In C# i can write a line that asks C# to connect to HTTPS easily with the line

ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };

How do I adapt this to f#?

open System.Net
open System.IO

let url = "https://..."

let mutable request = HttpWebRequest.Create(url)
request.Method <- "GET"  
request.ContentType <- "multipart/form-data"

ServicePointManager.ServerCertificateValidationCallback = fun -> true ???? 

let mutable resp = request.GetResponse()

let fn =
    for i = 1 to 10 do
        request <- WebRequest.Create(url)
        resp <- request.GetResponse()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:31:27+00:00Added an answer on May 24, 2026 at 2:31 am
    ServicePointManager.ServerCertificateValidationCallback <-
      System.Net.Security.RemoteCertificateValidationCallback(fun _ _ _ _ -> true)
    

    The following works too:

    System.Net.ServicePointManager.ServerCertificateValidationCallback <- 
      (fun _ _ _ _ -> true) //four underscores (and seven years ago?)
    

    RemoteCertificateValidationCallback has the following signature:

    public delegate bool RemoteCertificateValidationCallback(
        Object sender,
        X509Certificate certificate,
        X509Chain chain,
        SslPolicyErrors sslPolicyErrors
    )
    

    Since pattern matching occurs for function arguments, and you’re ignoring all four parameters, you can substitute the wildcard pattern (underscore) for each, which is an idiomatic way to indicate a parameter is unused.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can we connect a PHP script to MS Access (.mdb) file? I tried
I am attempting to create a php script that can connect thru ssh to
In my code i tried to connect signal from QTrayIcon object and my form
I am learning PHP and tried to connect to MySQL. Altough I am using
I tried GNUBOX which use bluetooth to connect to my computer then to the
I have written an ActionScript client program that tries to connect to a local
I'm trying to publish my program so that it can get updates and am
I have an application that uses Hibernate to connect to my MySQL database. I'm
What can I do in the Android emulator to connect it to my localhost
I am trying to make a form using Oracle form Builder. I can connect

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.