Hi everyone!
I am new to the forum... :)
I tried to find out what exactly InvalidResponse means, but the only thing I found was a french topic and Google Translate is not the best at what it´s supposed to do... :P
What I think I could understand was that it has to do something with http
s, but I am not sure how to fix it...
int mCharID;
int mKeyID;
std::string mVCode;
sf::Http mHttp;
std::string mPath;
sf::Http::Request mRequest;
sf::Http::Response mResponse;
sf::Http::Response::Status mStatus;
mPath ="/account/" + FileName + "xml.aspx?";
if(mKeyID != NULL){mPath = mPath + "&keyID==" + std::to_string(mKeyID); }
if(mVCode != "") {mPath = mPath + "&vCode=" + mVCode; }
if(mCharID != NULL){mPath = mPath + "&characterID=" + std::to_string(mCharID); }
mHttp.setHost("https://api.eveonline.com");
mRequest.setUri(mPath);
mResponse = mHttp.sendRequest(mRequest);
mStatus = mResponse.getStatus();
if(mStatus == sf::Http::Response::Ok)
{
std::cout << mResponse.getBody() << std::endl;
} else
{
std::cout << "Error " << mStatus << std::endl;
}