Skip to content

Unable to receive response in Windows 10 for POST request to API #42

@mskhaled

Description

@mskhaled

I'm encountering an issue where a particular section of code is not returning a response when executed on Windows 10. The code snippet in question is as follows:

.Open_ "POST", "https://apiv1.spapharmainvest.com:5443/efa_sud/api/login", False
.SetRequestHeader "Authorization", "Basic Q0wwMDAwMjM6T0xyVENkcmE="
.SetRequestHeader "Cache-Control", "no-cache"
.SetRequestHeader "Content-Length", 0
.SetRequestHeader "Accept", "*/*"
.SetRequestHeader "Connection", "keep-alive"
.SetRequestHeader "Accept-Encoding", "gzip, deflate" ', br"
.SetRequestHeader "Accept-Language", "fr-FR,fr;q=0.8"
.Option_(WinHttpRequestOption_UserAgentString) = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.87 Safari/537.36"       
.Send

This code is intended to send a POST request to the specified API endpoint, but it fails to return a response when run on a Windows 10 environment. However, it seems to work as expected on other platforms.

Expected behavior:
The code should send a POST request to the specified API endpoint and receive a response, regardless of the operating system.

Actual behavior:
The code executes without errors, but it does not receive a response on Windows 10.

Steps to reproduce:

Run the provided code snippet on a Windows 10 environment.
Observe that no response is received.

Environment:
Operating System: Windows 10
Programming Language: VB6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions