Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Jokler

Pages: [1]
1
Network / Re: sf::Http::Response::Status == 1000(InvalidResponse)
« on: March 18, 2014, 11:09:18 am »
Alright, will look into it.

And thank you for your help!

2
Network / sf::Http::Response::Status == 1000(InvalidResponse)
« on: March 18, 2014, 10:46:50 am »
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 https, 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;
}
 

Pages: [1]
anything