If I make a request to
More information is needed to be 100% sure (code sample, framework, ...), but the likely answer is yes.
If you POST with a relative URL, then the same host/port as the current page will be used.
You can open Chrome/Firefox's inspector to see how the browser actually made the request.
If you give the browser an absolute URL, then you can specify the http/https in the URL.