简体   繁体   中英

Using libcurl to write HTTPS SOAP client

I have been using libcurl to do a little webscraping and now I want to use it to write a HTTPS client. I am fine using libcurl so far by implementing the write_data() callback functions to write the received data to file (as explained in the libcurl tutorials). The thing I was wondering is that is it possible to get the server response from a char buffer, or set things up so that the response gets written to a char buffer?? Reading the response from a file is not the end of the world but it would just be much easier if I could get it straight from memory and parse the xml immediately. I have done a fair bit of searching both here and on the web in general but I have yet to find anything and thought I would ask here in case there is a 'trick' to getting what I want. I would guess not but I thought it was worth asking the question anyway.

Edit: I am writing this in C++

你的意思是getinmemory.c示例下载数据并将其保存在malloc的缓冲区中?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM