I know curl_easy_getinfo function can be used to get the http status code. Is there anyway to set a variable (curl_easy_setopt) and read value directly from it after performing the request?
How to get http status code directly into a variable in cURL lib?
590 Views Asked by IndikaU At
1
There are 1 best solutions below
Related Questions in CURL
- No responses from google places text search api
- compare python requests with curl
- file_get_contents not working on my server but works fine anywhere else?
- Converting curl command to iOS
- cURL PHP code redirect after success
- curl command cannot get contents from api.github, but the network is fine
- PHP cURL Request for Web Service Returning Error
- How to convert CURL command to Swift
- curl command don't work in some cases
- Silence output curl_setopt_array
- Validating a login using PHP
- Curl return 0 but doesn't not work
- Pg backups curl latest dump from Heroku
- Unable to install RabbitMQ using puppet due to curl error
- cleaning a post URL from an Array
Related Questions in LIBCURL
- Using libcurl on visual c++ to login to a website, What can be considered a successful login?
- Does libcurl load complete page in single shot?
- Elasticsearch REST api through curl not working from java.runtime.exec
- Fatal : The remote end hung up unexpectedly libcurl result = 7
- SSL write error with curl
- libcurl inbuilt compression support or not
- Authentication SAIO (swift all in one) using libCurl API in C++
- Error while running libcurl7.43.0 make in CentOS 5.11
- SMTP dot-stuffing within MIME boundaries
- LNK errors during built project with libcurl added
- Using libcurl to download file from any location on Remote system
- Libcurl compiling error: "undefined reference to `__mingw_basename'"
- How to implement a retry option in PyCurl
- CURLINFO_CONTENT_LENGTH_DOWNLOAD before curl_easy_perform
- How would one optimize the curl library for size?
Related Questions in HTTP-STATUS
- angularjs $http JSONP method returns http status code 0
- Using equal sign for HttpStatus.BAD_REQUEST not working
- Best way to concurrently check urls (for status i.e. 200,301,404) for multiple urls in database
- HTTP status quote when a resource can't be inserted but could be fixed by the client
- What is the correct HTTP status for exceptions?
- Multi threading script for HTTP status codes
- Changing HTTP status message using Sinatra
- How to return http statuscodes in php?
- Is there any possibility to get status code i.e. (200,301,302) after loading html page in CefSharp C#?
- How to force Spring Boot to set correct HTTP status code to error response?
- PHP-FPM Always Returns 200 Regardless Of NGINX Status Code
- REST API response status code - search GET that returns a single result
- What is the suitable HTTP status code when request is successful but has warning messages?
- How to get http status code directly into a variable in cURL lib?
- HTTP 404 vs 400 for invalid query parameters
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
No, you use curl_easy_getinfo() to extract information from the previous transfer. Even for HTTP response codes: CURLINFO_RESPONSE_CODE.