I have a software which allows user to enter username and password, then submit a request which is sent to my sailsjs server where I want to read it using req.username
and req.password
.
How do you set the request? Currently I only know how to set header using QNetworkRequest.setRawHeader("username", username)
, where server side will access using req.headers.username
, which isn't what I want.
I'm doing this because I already have some codes in my server that reads username using req.username
, so I need to find a way to set req
fields. However I want to do it from my client side using Qt. Any help would be greatly appreciated. Thanks in advance.