-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using HTTPS for REST calls #278
Comments
Hello @DanujaSW , It's a guess but it could be because your https service uses an invalid certificate (self-signed certificate for example). You can disable this check by setting To help you with more verbose information, you can enable I also suggest using ulfius_set_request_properties for readability: struct _u_request request;
ulfius_init_request(&request);
if (ulfius_set_request_properties(&request, U_OPT_HTTP_VERB, "GET", U_OPT_HTTP_URL, UPDATE_URL, U_OPT_CHECK_SERVER_CERTIFICATE, 0, U_OPT_NONE) == U_OK) {
// Send the request, then parse the response
} else {
// Error on ulfius_set_request_properties
} |
Hi @babelouest , Thank you for the clarification. The function that I provided initially works for an HTTP request. So would the process to convert it to work with HTTPS requests be the following:
Is this the process that I need to follow or would there be any additional steps needed? |
I don't know about your system configuration so I won't assume it will work or not. The process you mention at least is worth a try, but I don't know if this would fix your issue. But the option You can also dig deeper by testing with libcurl (which ulfius' out request is based on) to master your requests parameters and response. |
Thank you for the advice. I will make some changes using the approaches you suggested and let you know how it goes |
Hi,
I have set up the function below to send a HTTP GET request to a REST endpoint. May I know if libulfius supports REST calls via HTTPS?
If so, may I have some guidance on how this can be implemented?
Thanks
Function:
The text was updated successfully, but these errors were encountered: