puppeteer/assets/js/96012a21.db79bc74.js

2 lines
3.0 KiB
JavaScript
Raw Normal View History

/*! For license information please see 96012a21.db79bc74.js.LICENSE.txt */
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[52265],{26995:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>a,contentTitle:()=>p,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>c});var r=n(85893),t=n(11151);const o={sidebar_label:"HTTPResponse.json"},p="HTTPResponse.json() method",i={id:"api/puppeteer.httpresponse.json",title:"HTTPResponse.json() method",description:"Promise which resolves to a JSON representation of response body.",source:"@site/versioned_docs/version-22.0.0/api/puppeteer.httpresponse.json.md",sourceDirName:"api",slug:"/api/puppeteer.httpresponse.json",permalink:"/api/puppeteer.httpresponse.json",draft:!1,unlisted:!1,tags:[],version:"22.0.0",frontMatter:{sidebar_label:"HTTPResponse.json"},sidebar:"api",previous:{title:"HTTPResponse.headers",permalink:"/api/puppeteer.httpresponse.headers"},next:{title:"HTTPResponse.ok",permalink:"/api/puppeteer.httpresponse.ok"}},a={},c=[{value:"Signature:",id:"signature",level:4},{value:"Remarks",id:"remarks",level:2}];function l(e){const s={code:"code",h1:"h1",h2:"h2",h4:"h4",p:"p",pre:"pre",strong:"strong",...(0,t.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{id:"httpresponsejson-method",children:"HTTPResponse.json() method"}),"\n",(0,r.jsx)(s.p,{children:"Promise which resolves to a JSON representation of response body."}),"\n",(0,r.jsx)(s.h4,{id:"signature",children:"Signature:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-typescript",children:"class HTTPResponse {\n json(): Promise<any>;\n}\n"})}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Returns:"})}),"\n",(0,r.jsx)(s.p,{children:"Promise<any>"}),"\n",(0,r.jsx)(s.h2,{id:"remarks",children:"Remarks"}),"\n",(0,r.jsxs)(s.p,{children:["This method will throw if the response body is not parsable via ",(0,r.jsx)(s.code,{children:"JSON.parse"}),"."]})]})}function d(e={}){const{wrapper:s}={...(0,t.a)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},75251:(e,s,n)=>{var r=n(67294),t=Symbol.for("react.element"),o=Symbol.for("react.fragment"),p=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function c(e,s,n){var r,o={},c=null,l=null;for(r in void 0!==n&&(c=""+n),void 0!==s.key&&(c=""+s.key),void 0!==s.ref&&(l=s.ref),s)p.call(s,r)&&!a.hasOwnProperty(r)&&(o[r]=s[r]);if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:t,type:e,key:c,ref:l,props:o,_owner:i.current}}s.Fragment=o,s.jsx=c,s.jsxs=c},85893:(e,s,n)=>{e.exports=n(75251)},11151:(e,s,n)=>{n.d(s,{Z:()=>i,a:()=>p});var r=n(67294);const t={},o=r.createContext(t);function p(e){const s=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:p(e.components),r.createElement(o.Provider,{value:s},e.children)}}}]);