Convert command line cURL to C cURL
-
I've never done any curl before so am in need of some help. I've tried to work this out from examples but cannot get my head around it! I have a curl command that I can successfully run from a windows command line that index pdf file in Solr. I would need to incorporate this curl command in a C clinet. How can I translate this curl command so that it works in a C cURL client? curl "http://localhost:8983/solr/update/extract?literal.id=doc2&uprefix=attr_&fmap.content=attr_content&commit=true"" -F "[email protected]"
-
Answer:
STARTUPINFO si = { sizeof(STARTUPINFO) }; PROCESS_INFORMATION pi; TCHAR tempCmdLine[MAX_PATH]; _tcscpy_s(tempCmdLine, MAX_PATH, _T("curl.exe http://localhost:8983/solr/update/extract?literal.id=doc2&uprefix=attr_&fmap.content=attr_content&commit=true -F [email protected]")); CreateProcess(NULL, tempCmdLine, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); You may want to check the return value of CreateProcess.
prasad at Stack Overflow Visit the source
Related Q & A:
- How to remove path of my command line?Best solution by Super User
- How to Convert Code from VB to C++?Best solution by Stack Overflow
- How to create jar file from command line?Best solution by Stack Overflow
- How to convert xml to json in c#?Best solution by Stack Overflow
- How to change brightness on Linux desktop through the command line?Best solution by Super User
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.