{"id":49214,"library":"resty-client","title":"Resty Client","description":"Simple HTTP and REST client library built on top of axios for Browser and Node.js, inspired by Go's resty. Current stable version 0.0.5 (prerelease). Release cadence is irregular as it is a young project. Key differentiators: centralized request management, middleware support for requests and responses, and a simple API similar to Go's resty. However, it is still in early development with limited adoption and documentation.","status":"active","version":"0.0.5","language":"javascript","source_language":"en","source_url":"https://github.com/vnues/resty-client","tags":["javascript","request","api","rest","restful","resty","rest client","http","https","typescript"],"install":[{"cmd":"npm install resty-client","lang":"bash","label":"npm"},{"cmd":"yarn add resty-client","lang":"bash","label":"yarn"},{"cmd":"pnpm add resty-client","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Underlying HTTP client; Resty Client wraps axios for a simplified interface.","package":"axios","optional":false}],"imports":[{"note":"Package is ESM-only; CommonJS require will fail.","wrong":"const resty = require('resty-client')","symbol":"default","correct":"import resty from 'resty-client'"},{"note":"Use static create() method to instantiate a client, not constructor.","wrong":"const client = new resty()","symbol":"resty interface (instance)","correct":"const client = resty.create()"},{"note":"TypeScript types are bundled; import type for config objects.","wrong":null,"symbol":"RequestConfig type","correct":"import type { RequestConfig } from 'resty-client'"}],"quickstart":{"code":"import resty from 'resty-client';\n\nconst client = resty.create({\n  baseURL: 'https://api.example.com',\n  timeout: 5000,\n  headers: { 'Content-Type': 'application/json' }\n});\n\nasync function getUser() {\n  try {\n    const response = await client.get('/user/123', {\n      params: { id: 123 }\n    });\n    console.log(response.data);\n  } catch (error) {\n    console.error(error);\n  }\n}\n\ngetUser();","lang":"typescript","description":"Shows how to create a Resty client with baseURL and timeout, then make a GET request with params."},"warnings":[{"fix":"Update import to 'resty-client'.","message":"Import path changed from 'resty' to 'resty-client' in v0.0.5","severity":"breaking","affected_versions":"<0.0.5"},{"fix":"Use await or .then() when calling client.get/post etc.","message":"All methods return Promise; must be awaited or .then() used","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use ESM imports (import/export) or configure Node to handle ESM.","message":"No CommonJS support; package is ESM-only (type: module in package.json)","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Set Authorization header manually for bearer tokens.","message":"Auth config uses HTTP Basic only via `auth` property; no bearer token support in config","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.0.5':26 'adopt':67 'api':52,72 'axio':13 'browser':15 'built':9 'cadenc':29 'central':40 'client':2,7,77 'current':23 'develop':64 'differenti':39 'document':69 'earli':63 'go':20,55 'howev':58 'http':4,78 'https':79 'inspir':18 'irregular':31 'javascript':70 'key':38 'librari':8 'limit':66 'manag':42 'middlewar':43 'node.js':17 'prereleas':27 'project':37 'releas':28 'request':41,46,71 'respons':48 'rest':6,73,74,76 'resti':1,22,57,75 'similar':53 'simpl':3,51 'stabl':24 'still':61 'support':44 'top':11 'typescript':80 'version':25 'young':36","created_at":"2026-06-07T17:00:38.254708+00:00","updated_at":"2026-06-07T17:00:38.254708+00:00","problems":[{"fix":"Add 'type': 'module' to package.json or switch to .mjs file extension.","cause":"Using import in CommonJS environment without ESM support.","error":"SyntaxError: Cannot use import statement outside a module"},{"fix":"Ensure you import resty from 'resty-client' and call resty.create(config).","cause":"Attempting to use default import without calling create; or using old v0.0.4 where create was named differently.","error":"resty.create is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/vnues/resty-client","github":"https://github.com/vnues/resty-client","docs":null,"changelog":null,"pypi":null,"npm":"resty-client","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}