-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
HttpClient MakeRequest deprecated - any similar function ? #2802
Comments
Why are you trying to invoke the http client directly? This is most likely a anti pattern and you should not be doing this, but lets see if we can point you in the right direction. Are you trying to make a http request to a non aws service? if yes, you likely should be using the underlying http client to do such. if on windows as you mention you could use the win http client which the SDK uses under the hood. Alternatively you could install and use easy_curl/libcurl or curl for people Are your trying to make a request to a aws service? if yes, then why are you not using the higher level client? depending one which category you fall in we can discuss what you should do next. Thats aside
thats is a very old version and no more updates will be added to the 1.6 tag. if you dont update your version to HEAD you will be missing some very important changes. any reason you are not using HEAD? if you update your version the code you have mentioned in the ticket will work, although I would recommend against using the http client directly. |
Thank you, Will try with libcurl, that is enough for my task. |
|
Describe the bug
Hello,
When i am trying to call MakeRequest from HttpClient, its showing the error like,
error C2027: use of undefined type 'Aws::Http::HttpClient'
note: see declaration of 'Aws::Http::HttpClient'
error C2039: 'MakeRequest': is not a member of 'std::shared_ptrAws::Http::HttpClient'
Here is the code i am using
std::shared_ptrAws::Http::HttpClient myclient = Aws::Http::CreateHttpClient(clientConfig);
Aws::Http::URI url("some path);
std::shared_ptrAws::Http::HttpRequest req(Aws::Http::CreateHttpRequest(url, Aws::Http::HttpMethod::HTTP_POST, Aws::Utils::Stream::DefaultResponseStreamFactoryMethod));
std::shared_ptrAws::IOStream body = Aws::MakeSharedAws::StringStream(extParam.c_str());
req->AddContentBody(body);
std::shared_ptrAws::Http::HttpResponse res = myclient->MakeRequest(*req); // getting error here
Aws::Http::HttpResponseCode resCode = res->GetResponseCode();
Is there any other way to send request to retrieve the results ?
Regards,
Gopinath.
Expected Behavior
compile
Current Behavior
showing error
Reproduction Steps
no special steps
Possible Solution
No response
Additional Information/Context
No response
AWS CPP SDK version used
1.6.2
Compiler and Version used
visual studio 2015
Operating System and version
windows 10
The text was updated successfully, but these errors were encountered: