Hi there,
Thanks for putting this together, it's been fun to use!
I'm not all that familiar with J, so feel free to close, but I'm writing this to track down the changes I had to make to in order to check the response code of the sample function in test/simple.ijs, I couldn't use the existing curl_easy_getinfo wrapper, because the wrapped libcurl function is variadic, and getinfo is meant to take a pointer to a long (*l), which is then mutated.
(I also had to change to dll path to the full path, or change the working directory of my script to wherever the libcurl.dll was located, as it wasn't globally available on my system.)
This was the code I ended up using to read the response code:
hex2num =: 3 : '16 #. ''0123456789abcdef'' i. tolower }. y '
'"libcurl.dll" curl_easy_getinfo i x i *l '(15!:0) curlinstancepointer; (2+ hex2num'#200000'); ,0
Where I changed the signature by removing the < to get access to all modified values, and changing the last x to a *l. I also used the wiki and this blogpost to help sort it out.
Thanks again!
Hi there,
Thanks for putting this together, it's been fun to use!
I'm not all that familiar with J, so feel free to close, but I'm writing this to track down the changes I had to make to in order to check the response code of the
samplefunction intest/simple.ijs, I couldn't use the existingcurl_easy_getinfowrapper, because the wrapped libcurl function is variadic, andgetinfois meant to take a pointer to a long (*l), which is then mutated.(I also had to change to dll path to the full path, or change the working directory of my script to wherever the
libcurl.dllwas located, as it wasn't globally available on my system.)This was the code I ended up using to read the response code:
Where I changed the signature by removing the
<to get access to all modified values, and changing the lastxto a*l. I also used the wiki and this blogpost to help sort it out.Thanks again!