> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: ok() # Method package: wixFetch # Method menu location: wixFetch --> WixFetchResponse --> ok # Method Link: https://dev.wix.com/docs/velo/apis/wix-fetch/wix-fetch-response/ok.md # Method Description: Indicates if the request was successful, meaning its `status` is in the range 2xx. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Get whether a response is ok. ```javascript let isOk = httpResponse.ok; // true ``` ## Get a resource and the response information ```javascript import {fetch} from 'wix-fetch'; // ... fetch("https://someapi.com/api/someendpoint", {"method": "get"}) .then( (httpResponse) => { let url = httpResponse.url; let statusCode = httpResponse.status; let statusText = httpResponse.statusText; let headers = httpResponse.headers; let bodyUsed = httpResponse.bodyUsed; if (httpResponse.ok) { return httpResponse.json(); } else { return Promise.reject("Fetch did not succeed"); } } ) .then( (json) => { console.log(json.someKey); } ) .catch( (err) => { console.log(err); } ); ``` ---