{"id":27786275,"url":"https://github.com/clever/quest","last_synced_at":"2025-10-29T23:50:24.859Z","repository":{"id":5286509,"uuid":"6465992","full_name":"Clever/quest","owner":"Clever","description":"node http requests made easy","archived":false,"fork":false,"pushed_at":"2024-09-19T01:36:13.000Z","size":92,"stargazers_count":29,"open_issues_count":7,"forks_count":6,"subscribers_count":66,"default_branch":"master","last_synced_at":"2025-04-27T06:06:24.743Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"evilcos/papers","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Clever.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-30T23:15:42.000Z","updated_at":"2023-07-06T09:43:51.000Z","dependencies_parsed_at":"2022-09-12T22:52:45.939Z","dependency_job_id":null,"html_url":"https://github.com/Clever/quest","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clever%2Fquest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clever%2Fquest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clever%2Fquest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clever%2Fquest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Clever","download_url":"https://codeload.github.com/Clever/quest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251737771,"owners_count":21635669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-30T15:58:49.217Z","updated_at":"2025-10-29T23:50:24.775Z","avatar_url":"https://github.com/Clever.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quest - massively simplified, super lightweight HTTP requests\n\n[![Build Status](https://ci.ops.clever.com/api/badge/github.com/Clever/quest/status.svg?style=flat\u0026branch=master)](https://ci.ops.clever.com/github.com/Clever/quest)\n\n## Install\n\n```\nnpm install quest\n```\n\n## Super simple to use\n\nQuest is the simplest way to make http calls, as well as a drop-in replacement for the popular `request` library. It supports HTTPS and follows redirects by default.\n\n```coffeescript\nquest = require 'quest'\nquest 'www.google.com', (err, response, body) -\u003e\n  console.log body if not err? and response.statusCode is 200\n```\n\n## Supported options\n* `uri` - fully qualified uri (e.g. http://google.com). if protocol is left off, assumes http://. may include basic auth\n* `auth` - a string of the form `username:password` to be used for http basic auth\n* `qs` - object containing querystring values to be appended to the uri\n* `method` - http method, defaults to GET\n* `headers` - http headers, defaults to {}\n* `body` - entity body for POST and PUT requests. must be string\n* `form` - object containing form values to send in the body. also adds `content-type: application/x-www-form-urlencoded; charset=utf-8` to the header\n* `json` - if true, parses response as JSON. if object, additionally sends JSON representation of the object in the body and adds `content-type: application/json` to the header\n* `followRedirects` - follow HTTP 3xx responses as redirects. defaults to true\n* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects. defaults to false\n* `maxRedirects` - the maximum number of redirects to follow. defaults to 10\n* `jar` - cookies are enabled by default. set to `false` to disable. optionally pass in your own custom cookie jar (see Cookies below)\n* `timeout` - integer containing the number of milliseconds to wait for a request to respond before aborting the request\n\nThe options object is passed in instead of a url string.\n```coffeescript\nquest = require 'quest'\n\noptions =\n  uri: 'www.google.com'\n  method: \"POST\"\n\nquest options, (err, response, body) -\u003e\n  console.log body if not err? and response.statusCode is 200\n```\n\n## Cookies\nCookies are enabled by default. This means that if your requests involved redirection, any redirects will contain cookies set prior. To disable cookies, set jar to false.\n\nIf you want to use a custom cookie jar (instead of letting quest use its own default cookie jar) you do so by specifying a jar as an option:\n\n```coffeescript\nj = quest.jar()\nquest {uri: 'www.google.com', jar: j}, () -\u003e\n quest {uri: 'images.google.com', jar: j}, () -\u003e\n   # The request to Google images was sent with any cookies that were set by the original request to Google\n```\n\nNote that any cookies that earlier requests set are set in your custom jar, so you can use them for later requests. You can also set your own cookies when you specify a jar:\n\n```coffeescript\nj = quest.jar()\ncookie = quest.cookie 'your_cookie_here'\nj.add cookie\nquest {uri: 'www.google.com', jar: j}, (err, resp, body) -\u003e\n  # The request to Google was sent with the cookie that you specified\n```\n\n## Promises\nQuest also supports [ES6 Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n```coffeescript\nquest = require 'quest'\n\nquest 'www.google.com'\n  .then (response) -\u003e\n    console.log response.body if response.statusCode is 200\n  , (err) -\u003e\n    console.log err\n```\n\n## Vs. request\nClever wrote quest after we had decided we'd spent too long diagnosing bugs in the third-party `request` module for node. It should be a drop-in replacement. What are the advantages of quest?\n\n1. No global state\n\n2. Cleaner codebase: 1/10th as many lines of code\n\n3. Fewer bugs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclever%2Fquest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclever%2Fquest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclever%2Fquest/lists"}