user37940: Board: ESP8266MOD module from AI Thinker. 
Using ArduinoHttpClient I am unable to send a post message to an Azure IOT Hub endpoint. The endpoint is listening on 443 and expects a shared key passed via a custom header. 
The error I get is "Connection Timed Out"
Here is the brief sketch
char serverAddress[] = "myapp.azure-devices.net";
int port = 443;
string sig = "Azure shared access signature";
HttpClient client = HttpClient(wifiClient, serverAddress, port);
  String jsonPayload = payload; // passed into this function
  client.beginRequest();
  String contentType = "application/json";
  client.post("/devices/deviceId/messages/events?api-version=2016-02-03");
  client.sendHeader(HTTP_HEADER_CONTENT_TYPE, contentType);
  client.sendHeader("Authorization", sig);
  client.sendHeader(HTTP_HEADER_CONTENT_LENGTH, jsonPayload.length());
  client.beginBody();
  client.print(jsonPayload);
  client.endRequest();

  statusCode = client.responseStatusCode();
  response = client.responseBody();

The Status Code is -3 indicating a Timeout
I then created a simple REST API that accepts the JSON. Hosted it as an Azure website on port 80. 
The board is able to connect to this HTTP endpoint
Question(s):
1. Is the board underpowered to handle HTTPS?
2. Is creating an HTTP proxy the only option?
3. Am I not using the right library?
Thanks

user4143: You are only making an HTTP request to an HTTPS server. It's not going to work.
AFAIK there is no direct support for HTTPS in the ESP8266 libraries, but there is support for SSL, and you can then manually create an HTTP request over that - as detailed in the HTTPSRequest.ino example.

user37940: Thanks to @Majenko I was able to find the right solution.
The resolution is here 
Essentially, a secure WiFiClient needs to be created and used in the HttpClient constructor

Paste the HTTPS URL You are trying to connect to, in a browser
window and grab the SHA1 Fingerprint of the certificate 
Create aninstance of WifiClientSecure 
Call Connect on WifiClientSecure passing in the HTTPS URL and Port number 
Upon successful connection, call the Verify method of WifiClientSecure to verify the fingerprint. 
Pass the fingerprint from setp1 and URL to this method
Use the WifiClientSecure instance when creating an instance of
HttpClient.

Hope this helps. 

37940: <p>Board: ESP8266MOD module from AI Thinker. </p>

<p>Using ArduinoHttpClient I am unable to send a post message to an Azure IOT Hub endpoint. The endpoint is listening on 443 and expects a shared key passed via a custom header. </p>

<p>The error I get is "Connection Timed Out"</p>

<p>Here is the brief sketch</p>

<pre><code>char serverAddress[] = "myapp.azure-devices.net";
int port = 443;
string sig = "Azure shared access signature";
HttpClient client = HttpClient(wifiClient, serverAddress, port);
  String jsonPayload = payload; // passed into this function
  client.beginRequest();
  String contentType = "application/json";
  client.post("/devices/deviceId/messages/events?api-version=2016-02-03");
  client.sendHeader(HTTP_HEADER_CONTENT_TYPE, contentType);
  client.sendHeader("Authorization", sig);
  client.sendHeader(HTTP_HEADER_CONTENT_LENGTH, jsonPayload.length());
  client.beginBody();
  client.print(jsonPayload);
  client.endRequest();

  statusCode = client.responseStatusCode();
  response = client.responseBody();
</code></pre>

<p>The Status Code is -3 indicating a Timeout</p>

<p>I then created a simple REST API that accepts the JSON. Hosted it as an Azure website on port 80. </p>

<p>The board is able to connect to this HTTP endpoint</p>

<p>Question(s):
1. Is the board underpowered to handle HTTPS?
2. Is creating an HTTP proxy the only option?
3. Am I not using the right library?</p>

<p>Thanks</p>
 4143: <p>You are only making an HTTP request to an HTTPS server. It's not going to work.</p>

<p>AFAIK there is no direct support for HTTPS in the ESP8266 libraries, but there is support for SSL, and you can then manually create an HTTP request over that - as detailed in the <a href="https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/examples/HTTPSRequest/HTTPSRequest.ino" rel="nofollow noreferrer">HTTPSRequest.ino</a> example.</p>
 37940: <p>Thanks to @Majenko I was able to find the right solution.</p>

<p>The resolution is <a href="https://github.com/arduino-libraries/ArduinoHttpClient/issues/13" rel="nofollow noreferrer">here</a> </p>

<p>Essentially, a secure WiFiClient needs to be created and used in the HttpClient constructor</p>

<ol>
<li>Paste the HTTPS URL You are trying to connect to, in a browser
window and grab the SHA1 Fingerprint of the certificate </li>
<li>Create aninstance of WifiClientSecure </li>
<li>Call Connect on WifiClientSecure passing in the HTTPS URL and Port number </li>
<li>Upon successful connection, call the Verify method of WifiClientSecure to verify the fingerprint. </li>
<li>Pass the fingerprint from setp1 and URL to this method</li>
<li>Use the WifiClientSecure instance when creating an instance of
HttpClient.</li>
</ol>

<p>Hope this helps. </p>
