how to use an https with qt network? [closed] - c++

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I have a question about https and qt network.
I would like to know if I use https url, can I use the same code like http url or I must do some changes. Does someone can say which change I must do?
ps: I would like to auth to my https website and do get/post

HTTPS will work with Qt so long as OpenSSL is available.
On Mac and Linux, this is typically an automatic. On Windows, you will likely need to build and ship the OpenSSL 1.0.x binaries, libeay32.dll and ssleay32.dll, with your application. If Qt can dynamically load these binaries at startup, HTTPS support will be available. Or rebuild Qt from source to statically link with the OpenSSL libraries.

Related

Best way to have a web user interface for a Qt application? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have written a service using C++ and Qt framework (QtService). The service should run in the background. I need the service to have a web user interface and can be accessed using web browsers. I mean the service should act as as a web server and output html content to a specific port. I know there are some frameworks that can be used to generate web content in C++, but by taking into account that I am using Qt, I prefer to use Qt features as much as possible rather than a new framework. Any ideas?
I have read about Cutelyst on the Qt blog a few times, which seems an exact fit to your question.

Self-host a Django Website [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Is it possible to host a website built with Django on one's personal machine? If so, how?
I built a small Django site, my first, based on a tutorial, and I want to make it live, so that I can see how it looks on other computers/devices, and allow friends/family to check it out. I have no way of purchasing a server.
A way to do what you're asking for is by using ngrok on your machine (using homebrew on a mac, brew install ngrok)
You would need to sign up at https://ngrok.com/signup to get an authtoken to password protect your site.
Install the authtoken: ngrok authtoken your_authtoken_here
To run your django app in your terminal, you would run (note that you could specify a different port; Django runs on 8000 by default):
python manage.py runserver
And then in another terminal window you would run:
ngrok http -auth='username:password' 8000
You'll see a screen with a line that looks like this:
Forwarding http://sfd98sdf.ngrok.io -> localhost:8000
You can then visit http://sfd98sdf.ngrok.io to view your site.
You would have to keep your machine running these processes for this to work.
Note that as commenters have said, this isn't the best or most secure way, but it's a quick way to do exactly what you want to do.

What's the simpliest way to fetch HTML in a string? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am looking for the very simplie way to fetch HTML body of a remote web site into a string using default C++ libraries or WinAPI.
There are no default C++ libraries to do this. And I'm not familiar with WinAPI. But check out the libcurl website here: http://curl.haxx.se/libcurl/. That site has a listing of "competitor" libraries that may be of use.
Have a look at Microsoft's WinInet API:
The Microsoft Windows Internet (WinINet) application programming interface (API) enables applications to access standard Internet protocols, such as FTP and HTTP. For ease of use, WinINet abstracts these protocols into a high-level interface.
Or Microsoft's WinHTTP API:
Microsoft Windows HTTP Services (WinHTTP) provides developers with an HTTP client application programming interface (API) to send requests through the HTTP protocol to other HTTP servers.
They are both built into Windows. You simply need to link to either wininet.dll or winhttp.dll, then #include either wininet.h or winhttp.h in your code, and call the relevant HTTP functions as needed.

Sitecore website only pointing to French Version [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I created a multilingual website with ( English and french). Both the version are working fine in my Dev environment. but after creating the packages and installed on Staging , my website only points to french version.
any help...
You need to install the language on your staging environment. Sitecore will install items with undefined languages just fine, but they won't work properly until the language is installed and registered.
Can be done from Sitecore Control Panel, Globalization options as I recall.
Make sure the relevant sections of your web.config (and config include) files are the same in both environments (e.g. check <sites> section).
Ensure you have published both languages in your staging environment?

Django project hang on the production server [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have put an updated version of the previous django project on to the server running httpd, wsgi. When I tried to open the site, the server just hang up here, after more than 5 minutes gives me 500 error. I have checked apache error log, nothing suspicious shows up. When I restored the previous version, it works fine.
In the updated version, I only add one application which using rpy2 to do some statistics.
By the way, everything is fine using the development server.
Any suggestions?
If it is the only Python site on that Apache and presuming you are using mod_wsgi, try adding:
WSGIApplicationGroup %{GLOBAL}
The third party module you are using likely has a C extension component which isn't implemented so as to be used in Python sub interpreters.
That directive forces uses of the main Python interpreter.
See documentation:
http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Python_Simplified_GIL_State_API