Reputation: 3141
I want to integrate an API that will allow my application to send requests to a web server. Unfortunately, this API is not well documented, and I have not gotten a reply from the person who supports the web service that released the API. The instructions on how to integrate the API are the following:
All API calls connect to the standard SSL port, and must begin with https://www.websitename.com/api.php?username=username&password=password&, followed by the list of parameters expressed as
parametername=value&
I am new to C# development. Can you interpret this set of instructions and tell me how I'd go about integrating this API? I mainly am confused about connecting to the SSL port.
Upvotes: 0
Views: 71
Reputation: 727
This sounds like it's just an HTTP request to that particular URL. You want to use the WebClient class, and possibly call the DownloadString
method, depending on what the response contains.
Upvotes: 1
Reputation: 13947
The standard SSL port is 443
, but if you're using a library that parses URLs correctly, it will connect to that port automatically if it sees https://
at the beginning. You can use a custom port by providing it after the hostname (separated by a :
), such as https://websitename.com:8443/
, if you had an SSL service running on port 8443
instead of 443
.
Upvotes: 0