puppeteer/assets/js/fbc2587a.ca967e08.js
release-please[bot] cc95c085a2 deploy: 1014abc087
2023-11-29 13:34:30 +00:00

2 lines
3.0 KiB
JavaScript

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