Skip to content
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

Example of sending a form doesn't work #64

Closed
czaarek99 opened this issue Jan 1, 2016 · 7 comments
Closed

Example of sending a form doesn't work #64

czaarek99 opened this issue Jan 1, 2016 · 7 comments

Comments

@czaarek99
Copy link

Im pretty new to C++ and I am using this library. But the example with the form does not compile because you can not easy.add a form for object.

@JosephP91
Copy link
Owner

Hi @czaarek99 ,
I have fixed the readme examples! Can you try now (also updating your local copy) and let me now? Thank you!

@czaarek99
Copy link
Author

I don't know if I don't understand something due to learning C++ but is it intended to have to use a const_cast to be able to pass the curl_httppost? Because I get the error that it is a const pointer and can't do it.
easy.add<CURLOPT_HTTPPOST>(const_cast<curl_httppost*>(form.get()));

@JosephP91
Copy link
Owner

@czaarek99 you don't need to use a const_cast. Why are you using it?

@czaarek99
Copy link
Author

Otherwise my IDE complains with this:
http://puu.sh/mhbIP.png
And it won't compile.

EDIT:
Lol I realized I shared a password in that screen. Already changed though :p

@JosephP91
Copy link
Owner

@czaarek99 Got it. I have pushed a fix right now. Let me know!

@czaarek99
Copy link
Author

Thank you, works just fine now 👍

@JosephP91
Copy link
Owner

Good! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants