Best K6 code snippet using html.Headers
client.go
Source:client.go
...8 openapiutil "github.com/alibabacloud-go/openapi-util/service"9 util "github.com/alibabacloud-go/tea-utils/service"10 "github.com/alibabacloud-go/tea/tea"11)12type CreateMiniAppHeaders struct {13 CommonHeaders map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`14 XAcsDingtalkAccessToken *string `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`15}16func (s CreateMiniAppHeaders) String() string {17 return tea.Prettify(s)18}19func (s CreateMiniAppHeaders) GoString() string {20 return s.String()21}22func (s *CreateMiniAppHeaders) SetCommonHeaders(v map[string]*string) *CreateMiniAppHeaders {23 s.CommonHeaders = v24 return s25}26func (s *CreateMiniAppHeaders) SetXAcsDingtalkAccessToken(v string) *CreateMiniAppHeaders {27 s.XAcsDingtalkAccessToken = &v28 return s29}30type CreateMiniAppRequest struct {31 BizId *string `json:"bizId,omitempty" xml:"bizId,omitempty"`32 BizType *int32 `json:"bizType,omitempty" xml:"bizType,omitempty"`33 BundleId *string `json:"bundleId,omitempty" xml:"bundleId,omitempty"`34 Desc *string `json:"desc,omitempty" xml:"desc,omitempty"`35 Icon *string `json:"icon,omitempty" xml:"icon,omitempty"`36 Name *string `json:"name,omitempty" xml:"name,omitempty"`37}38func (s CreateMiniAppRequest) String() string {39 return tea.Prettify(s)40}41func (s CreateMiniAppRequest) GoString() string {42 return s.String()43}44func (s *CreateMiniAppRequest) SetBizId(v string) *CreateMiniAppRequest {45 s.BizId = &v46 return s47}48func (s *CreateMiniAppRequest) SetBizType(v int32) *CreateMiniAppRequest {49 s.BizType = &v50 return s51}52func (s *CreateMiniAppRequest) SetBundleId(v string) *CreateMiniAppRequest {53 s.BundleId = &v54 return s55}56func (s *CreateMiniAppRequest) SetDesc(v string) *CreateMiniAppRequest {57 s.Desc = &v58 return s59}60func (s *CreateMiniAppRequest) SetIcon(v string) *CreateMiniAppRequest {61 s.Icon = &v62 return s63}64func (s *CreateMiniAppRequest) SetName(v string) *CreateMiniAppRequest {65 s.Name = &v66 return s67}68type CreateMiniAppResponseBody struct {69 // result70 MiniAppId *string `json:"miniAppId,omitempty" xml:"miniAppId,omitempty"`71}72func (s CreateMiniAppResponseBody) String() string {73 return tea.Prettify(s)74}75func (s CreateMiniAppResponseBody) GoString() string {76 return s.String()77}78func (s *CreateMiniAppResponseBody) SetMiniAppId(v string) *CreateMiniAppResponseBody {79 s.MiniAppId = &v80 return s81}82type CreateMiniAppResponse struct {83 Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty" require:"true"`84 Body *CreateMiniAppResponseBody `json:"body,omitempty" xml:"body,omitempty" require:"true"`85}86func (s CreateMiniAppResponse) String() string {87 return tea.Prettify(s)88}89func (s CreateMiniAppResponse) GoString() string {90 return s.String()91}92func (s *CreateMiniAppResponse) SetHeaders(v map[string]*string) *CreateMiniAppResponse {93 s.Headers = v94 return s95}96func (s *CreateMiniAppResponse) SetBody(v *CreateMiniAppResponseBody) *CreateMiniAppResponse {97 s.Body = v98 return s99}100type CreateMiniAppPluginHeaders struct {101 CommonHeaders map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`102 XAcsDingtalkAccessToken *string `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`103}104func (s CreateMiniAppPluginHeaders) String() string {105 return tea.Prettify(s)106}107func (s CreateMiniAppPluginHeaders) GoString() string {108 return s.String()109}110func (s *CreateMiniAppPluginHeaders) SetCommonHeaders(v map[string]*string) *CreateMiniAppPluginHeaders {111 s.CommonHeaders = v112 return s113}114func (s *CreateMiniAppPluginHeaders) SetXAcsDingtalkAccessToken(v string) *CreateMiniAppPluginHeaders {115 s.XAcsDingtalkAccessToken = &v116 return s117}118type CreateMiniAppPluginRequest struct {119 BizId *string `json:"bizId,omitempty" xml:"bizId,omitempty"`120 BizType *int32 `json:"bizType,omitempty" xml:"bizType,omitempty"`121 BundleId *string `json:"bundleId,omitempty" xml:"bundleId,omitempty"`122 Desc *string `json:"desc,omitempty" xml:"desc,omitempty"`123 Icon *string `json:"icon,omitempty" xml:"icon,omitempty"`124 Name *string `json:"name,omitempty" xml:"name,omitempty"`125}126func (s CreateMiniAppPluginRequest) String() string {127 return tea.Prettify(s)128}129func (s CreateMiniAppPluginRequest) GoString() string {130 return s.String()131}132func (s *CreateMiniAppPluginRequest) SetBizId(v string) *CreateMiniAppPluginRequest {133 s.BizId = &v134 return s135}136func (s *CreateMiniAppPluginRequest) SetBizType(v int32) *CreateMiniAppPluginRequest {137 s.BizType = &v138 return s139}140func (s *CreateMiniAppPluginRequest) SetBundleId(v string) *CreateMiniAppPluginRequest {141 s.BundleId = &v142 return s143}144func (s *CreateMiniAppPluginRequest) SetDesc(v string) *CreateMiniAppPluginRequest {145 s.Desc = &v146 return s147}148func (s *CreateMiniAppPluginRequest) SetIcon(v string) *CreateMiniAppPluginRequest {149 s.Icon = &v150 return s151}152func (s *CreateMiniAppPluginRequest) SetName(v string) *CreateMiniAppPluginRequest {153 s.Name = &v154 return s155}156type CreateMiniAppPluginResponseBody struct {157 // result158 MiniAppId *string `json:"miniAppId,omitempty" xml:"miniAppId,omitempty"`159}160func (s CreateMiniAppPluginResponseBody) String() string {161 return tea.Prettify(s)162}163func (s CreateMiniAppPluginResponseBody) GoString() string {164 return s.String()165}166func (s *CreateMiniAppPluginResponseBody) SetMiniAppId(v string) *CreateMiniAppPluginResponseBody {167 s.MiniAppId = &v168 return s169}170type CreateMiniAppPluginResponse struct {171 Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty" require:"true"`172 Body *CreateMiniAppPluginResponseBody `json:"body,omitempty" xml:"body,omitempty" require:"true"`173}174func (s CreateMiniAppPluginResponse) String() string {175 return tea.Prettify(s)176}177func (s CreateMiniAppPluginResponse) GoString() string {178 return s.String()179}180func (s *CreateMiniAppPluginResponse) SetHeaders(v map[string]*string) *CreateMiniAppPluginResponse {181 s.Headers = v182 return s183}184func (s *CreateMiniAppPluginResponse) SetBody(v *CreateMiniAppPluginResponseBody) *CreateMiniAppPluginResponse {185 s.Body = v186 return s187}188type CreateVersionAcrossBundleHeaders struct {189 CommonHeaders map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`190 XAcsDingtalkAccessToken *string `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`191}192func (s CreateVersionAcrossBundleHeaders) String() string {193 return tea.Prettify(s)194}195func (s CreateVersionAcrossBundleHeaders) GoString() string {196 return s.String()197}198func (s *CreateVersionAcrossBundleHeaders) SetCommonHeaders(v map[string]*string) *CreateVersionAcrossBundleHeaders {199 s.CommonHeaders = v200 return s201}202func (s *CreateVersionAcrossBundleHeaders) SetXAcsDingtalkAccessToken(v string) *CreateVersionAcrossBundleHeaders {203 s.XAcsDingtalkAccessToken = &v204 return s205}206type CreateVersionAcrossBundleRequest struct {207 // bundleId208 BundleId *string `json:"bundleId,omitempty" xml:"bundleId,omitempty"`209 MiniAppId *string `json:"miniAppId,omitempty" xml:"miniAppId,omitempty"`210 // sourceBundleId211 SourceBundleId *string `json:"sourceBundleId,omitempty" xml:"sourceBundleId,omitempty"`212 // sourceVersion213 SourceVersion *string `json:"sourceVersion,omitempty" xml:"sourceVersion,omitempty"`214 // version215 Version *string `json:"version,omitempty" xml:"version,omitempty"`216}217func (s CreateVersionAcrossBundleRequest) String() string {218 return tea.Prettify(s)219}220func (s CreateVersionAcrossBundleRequest) GoString() string {221 return s.String()222}223func (s *CreateVersionAcrossBundleRequest) SetBundleId(v string) *CreateVersionAcrossBundleRequest {224 s.BundleId = &v225 return s226}227func (s *CreateVersionAcrossBundleRequest) SetMiniAppId(v string) *CreateVersionAcrossBundleRequest {228 s.MiniAppId = &v229 return s230}231func (s *CreateVersionAcrossBundleRequest) SetSourceBundleId(v string) *CreateVersionAcrossBundleRequest {232 s.SourceBundleId = &v233 return s234}235func (s *CreateVersionAcrossBundleRequest) SetSourceVersion(v string) *CreateVersionAcrossBundleRequest {236 s.SourceVersion = &v237 return s238}239func (s *CreateVersionAcrossBundleRequest) SetVersion(v string) *CreateVersionAcrossBundleRequest {240 s.Version = &v241 return s242}243type CreateVersionAcrossBundleResponseBody struct {244 // result245 Result *string `json:"result,omitempty" xml:"result,omitempty"`246}247func (s CreateVersionAcrossBundleResponseBody) String() string {248 return tea.Prettify(s)249}250func (s CreateVersionAcrossBundleResponseBody) GoString() string {251 return s.String()252}253func (s *CreateVersionAcrossBundleResponseBody) SetResult(v string) *CreateVersionAcrossBundleResponseBody {254 s.Result = &v255 return s256}257type CreateVersionAcrossBundleResponse struct {258 Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty" require:"true"`259 Body *CreateVersionAcrossBundleResponseBody `json:"body,omitempty" xml:"body,omitempty" require:"true"`260}261func (s CreateVersionAcrossBundleResponse) String() string {262 return tea.Prettify(s)263}264func (s CreateVersionAcrossBundleResponse) GoString() string {265 return s.String()266}267func (s *CreateVersionAcrossBundleResponse) SetHeaders(v map[string]*string) *CreateVersionAcrossBundleResponse {268 s.Headers = v269 return s270}271func (s *CreateVersionAcrossBundleResponse) SetBody(v *CreateVersionAcrossBundleResponseBody) *CreateVersionAcrossBundleResponse {272 s.Body = v273 return s274}275type GetMaxVersionHeaders struct {276 CommonHeaders map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`277 XAcsDingtalkAccessToken *string `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`278}279func (s GetMaxVersionHeaders) String() string {280 return tea.Prettify(s)281}282func (s GetMaxVersionHeaders) GoString() string {283 return s.String()284}285func (s *GetMaxVersionHeaders) SetCommonHeaders(v map[string]*string) *GetMaxVersionHeaders {286 s.CommonHeaders = v287 return s288}289func (s *GetMaxVersionHeaders) SetXAcsDingtalkAccessToken(v string) *GetMaxVersionHeaders {290 s.XAcsDingtalkAccessToken = &v291 return s292}293type GetMaxVersionRequest struct {294 // bundleId295 BundleId *string `json:"bundleId,omitempty" xml:"bundleId,omitempty"`296 // miniAppId297 MiniAppId *string `json:"miniAppId,omitempty" xml:"miniAppId,omitempty"`298 // version299 Version *string `json:"version,omitempty" xml:"version,omitempty"`300}301func (s GetMaxVersionRequest) String() string {302 return tea.Prettify(s)303}304func (s GetMaxVersionRequest) GoString() string {305 return s.String()306}307func (s *GetMaxVersionRequest) SetBundleId(v string) *GetMaxVersionRequest {308 s.BundleId = &v309 return s310}311func (s *GetMaxVersionRequest) SetMiniAppId(v string) *GetMaxVersionRequest {312 s.MiniAppId = &v313 return s314}315func (s *GetMaxVersionRequest) SetVersion(v string) *GetMaxVersionRequest {316 s.Version = &v317 return s318}319type GetMaxVersionResponseBody struct {320 // result321 Result *string `json:"result,omitempty" xml:"result,omitempty"`322}323func (s GetMaxVersionResponseBody) String() string {324 return tea.Prettify(s)325}326func (s GetMaxVersionResponseBody) GoString() string {327 return s.String()328}329func (s *GetMaxVersionResponseBody) SetResult(v string) *GetMaxVersionResponseBody {330 s.Result = &v331 return s332}333type GetMaxVersionResponse struct {334 Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty" require:"true"`335 Body *GetMaxVersionResponseBody `json:"body,omitempty" xml:"body,omitempty" require:"true"`336}337func (s GetMaxVersionResponse) String() string {338 return tea.Prettify(s)339}340func (s GetMaxVersionResponse) GoString() string {341 return s.String()342}343func (s *GetMaxVersionResponse) SetHeaders(v map[string]*string) *GetMaxVersionResponse {344 s.Headers = v345 return s346}347func (s *GetMaxVersionResponse) SetBody(v *GetMaxVersionResponseBody) *GetMaxVersionResponse {348 s.Body = v349 return s350}351type GetMiniAppMetaDataHeaders struct {352 CommonHeaders map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`353 XAcsDingtalkAccessToken *string `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`354}355func (s GetMiniAppMetaDataHeaders) String() string {356 return tea.Prettify(s)357}358func (s GetMiniAppMetaDataHeaders) GoString() string {359 return s.String()360}361func (s *GetMiniAppMetaDataHeaders) SetCommonHeaders(v map[string]*string) *GetMiniAppMetaDataHeaders {362 s.CommonHeaders = v363 return s364}365func (s *GetMiniAppMetaDataHeaders) SetXAcsDingtalkAccessToken(v string) *GetMiniAppMetaDataHeaders {366 s.XAcsDingtalkAccessToken = &v367 return s368}369type GetMiniAppMetaDataRequest struct {370 BundleId *string `json:"bundleId,omitempty" xml:"bundleId,omitempty"`371 BundleIdTableGmtModified map[string]interface{} `json:"bundleIdTableGmtModified,omitempty" xml:"bundleIdTableGmtModified,omitempty"`372 FromAppName *string `json:"fromAppName,omitempty" xml:"fromAppName,omitempty"`373 MiniAppIdTableGmtModified map[string]interface{} `json:"miniAppIdTableGmtModified,omitempty" xml:"miniAppIdTableGmtModified,omitempty"`374}375func (s GetMiniAppMetaDataRequest) String() string {376 return tea.Prettify(s)377}378func (s GetMiniAppMetaDataRequest) GoString() string {379 return s.String()380}381func (s *GetMiniAppMetaDataRequest) SetBundleId(v string) *GetMiniAppMetaDataRequest {382 s.BundleId = &v383 return s384}385func (s *GetMiniAppMetaDataRequest) SetBundleIdTableGmtModified(v map[string]interface{}) *GetMiniAppMetaDataRequest {386 s.BundleIdTableGmtModified = v387 return s388}389func (s *GetMiniAppMetaDataRequest) SetFromAppName(v string) *GetMiniAppMetaDataRequest {390 s.FromAppName = &v391 return s392}393func (s *GetMiniAppMetaDataRequest) SetMiniAppIdTableGmtModified(v map[string]interface{}) *GetMiniAppMetaDataRequest {394 s.MiniAppIdTableGmtModified = v395 return s396}397type GetMiniAppMetaDataResponseBody struct {398 // receiveTime399 DingOpenErrcode *int64 `json:"dingOpenErrcode,omitempty" xml:"dingOpenErrcode,omitempty"`400 // errorMsg401 ErrorMsg *string `json:"errorMsg,omitempty" xml:"errorMsg,omitempty"`402 // result403 Result *GetMiniAppMetaDataResponseBodyResult `json:"result,omitempty" xml:"result,omitempty" type:"Struct"`404 // requestId405 Success *bool `json:"success,omitempty" xml:"success,omitempty"`406}407func (s GetMiniAppMetaDataResponseBody) String() string {408 return tea.Prettify(s)409}410func (s GetMiniAppMetaDataResponseBody) GoString() string {411 return s.String()412}413func (s *GetMiniAppMetaDataResponseBody) SetDingOpenErrcode(v int64) *GetMiniAppMetaDataResponseBody {414 s.DingOpenErrcode = &v415 return s416}417func (s *GetMiniAppMetaDataResponseBody) SetErrorMsg(v string) *GetMiniAppMetaDataResponseBody {418 s.ErrorMsg = &v419 return s420}421func (s *GetMiniAppMetaDataResponseBody) SetResult(v *GetMiniAppMetaDataResponseBodyResult) *GetMiniAppMetaDataResponseBody {422 s.Result = v423 return s424}425func (s *GetMiniAppMetaDataResponseBody) SetSuccess(v bool) *GetMiniAppMetaDataResponseBody {426 s.Success = &v427 return s428}429type GetMiniAppMetaDataResponseBodyResult struct {430 // data431 Data map[string]interface{} `json:"data,omitempty" xml:"data,omitempty"`432}433func (s GetMiniAppMetaDataResponseBodyResult) String() string {434 return tea.Prettify(s)435}436func (s GetMiniAppMetaDataResponseBodyResult) GoString() string {437 return s.String()438}439func (s *GetMiniAppMetaDataResponseBodyResult) SetData(v map[string]interface{}) *GetMiniAppMetaDataResponseBodyResult {440 s.Data = v441 return s442}443type GetMiniAppMetaDataResponse struct {444 Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty" require:"true"`445 Body *GetMiniAppMetaDataResponseBody `json:"body,omitempty" xml:"body,omitempty" require:"true"`446}447func (s GetMiniAppMetaDataResponse) String() string {448 return tea.Prettify(s)449}450func (s GetMiniAppMetaDataResponse) GoString() string {451 return s.String()452}453func (s *GetMiniAppMetaDataResponse) SetHeaders(v map[string]*string) *GetMiniAppMetaDataResponse {454 s.Headers = v455 return s456}457func (s *GetMiniAppMetaDataResponse) SetBody(v *GetMiniAppMetaDataResponseBody) *GetMiniAppMetaDataResponse {458 s.Body = v459 return s460}461type GetSettingByMiniAppIdHeaders struct {462 CommonHeaders map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`463 XAcsDingtalkAccessToken *string `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`464}465func (s GetSettingByMiniAppIdHeaders) String() string {466 return tea.Prettify(s)467}468func (s GetSettingByMiniAppIdHeaders) GoString() string {469 return s.String()470}471func (s *GetSettingByMiniAppIdHeaders) SetCommonHeaders(v map[string]*string) *GetSettingByMiniAppIdHeaders {472 s.CommonHeaders = v473 return s474}475func (s *GetSettingByMiniAppIdHeaders) SetXAcsDingtalkAccessToken(v string) *GetSettingByMiniAppIdHeaders {476 s.XAcsDingtalkAccessToken = &v477 return s478}479type GetSettingByMiniAppIdResponseBody struct {480 Result *string `json:"result,omitempty" xml:"result,omitempty"`481}482func (s GetSettingByMiniAppIdResponseBody) String() string {483 return tea.Prettify(s)484}485func (s GetSettingByMiniAppIdResponseBody) GoString() string {486 return s.String()487}488func (s *GetSettingByMiniAppIdResponseBody) SetResult(v string) *GetSettingByMiniAppIdResponseBody {489 s.Result = &v490 return s491}492type GetSettingByMiniAppIdResponse struct {493 Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty" require:"true"`494 Body *GetSettingByMiniAppIdResponseBody `json:"body,omitempty" xml:"body,omitempty" require:"true"`495}496func (s GetSettingByMiniAppIdResponse) String() string {497 return tea.Prettify(s)498}499func (s GetSettingByMiniAppIdResponse) GoString() string {500 return s.String()501}502func (s *GetSettingByMiniAppIdResponse) SetHeaders(v map[string]*string) *GetSettingByMiniAppIdResponse {503 s.Headers = v504 return s505}506func (s *GetSettingByMiniAppIdResponse) SetBody(v *GetSettingByMiniAppIdResponseBody) *GetSettingByMiniAppIdResponse {507 s.Body = v508 return s509}510type InvokeHtmlBundleBuildHeaders struct {511 CommonHeaders map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`512 XAcsDingtalkAccessToken *string `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`513}514func (s InvokeHtmlBundleBuildHeaders) String() string {515 return tea.Prettify(s)516}517func (s InvokeHtmlBundleBuildHeaders) GoString() string {518 return s.String()519}520func (s *InvokeHtmlBundleBuildHeaders) SetCommonHeaders(v map[string]*string) *InvokeHtmlBundleBuildHeaders {521 s.CommonHeaders = v522 return s523}524func (s *InvokeHtmlBundleBuildHeaders) SetXAcsDingtalkAccessToken(v string) *InvokeHtmlBundleBuildHeaders {525 s.XAcsDingtalkAccessToken = &v526 return s527}528type InvokeHtmlBundleBuildRequest struct {529 BundleId *string `json:"bundleId,omitempty" xml:"bundleId,omitempty"`530 MiniAppId *string `json:"miniAppId,omitempty" xml:"miniAppId,omitempty"`531 Version *string `json:"version,omitempty" xml:"version,omitempty"`532}533func (s InvokeHtmlBundleBuildRequest) String() string {534 return tea.Prettify(s)535}536func (s InvokeHtmlBundleBuildRequest) GoString() string {537 return s.String()538}539func (s *InvokeHtmlBundleBuildRequest) SetBundleId(v string) *InvokeHtmlBundleBuildRequest {540 s.BundleId = &v541 return s542}543func (s *InvokeHtmlBundleBuildRequest) SetMiniAppId(v string) *InvokeHtmlBundleBuildRequest {544 s.MiniAppId = &v545 return s546}547func (s *InvokeHtmlBundleBuildRequest) SetVersion(v string) *InvokeHtmlBundleBuildRequest {548 s.Version = &v549 return s550}551type InvokeHtmlBundleBuildResponseBody struct {552 Result *string `json:"result,omitempty" xml:"result,omitempty"`553}554func (s InvokeHtmlBundleBuildResponseBody) String() string {555 return tea.Prettify(s)556}557func (s InvokeHtmlBundleBuildResponseBody) GoString() string {558 return s.String()559}560func (s *InvokeHtmlBundleBuildResponseBody) SetResult(v string) *InvokeHtmlBundleBuildResponseBody {561 s.Result = &v562 return s563}564type InvokeHtmlBundleBuildResponse struct {565 Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty" require:"true"`566 Body *InvokeHtmlBundleBuildResponseBody `json:"body,omitempty" xml:"body,omitempty" require:"true"`567}568func (s InvokeHtmlBundleBuildResponse) String() string {569 return tea.Prettify(s)570}571func (s InvokeHtmlBundleBuildResponse) GoString() string {572 return s.String()573}574func (s *InvokeHtmlBundleBuildResponse) SetHeaders(v map[string]*string) *InvokeHtmlBundleBuildResponse {575 s.Headers = v576 return s577}578func (s *InvokeHtmlBundleBuildResponse) SetBody(v *InvokeHtmlBundleBuildResponseBody) *InvokeHtmlBundleBuildResponse {579 s.Body = v580 return s581}582type ListAvaiableVersionHeaders struct {583 CommonHeaders map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`584 XAcsDingtalkAccessToken *string `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`585}586func (s ListAvaiableVersionHeaders) String() string {587 return tea.Prettify(s)588}589func (s ListAvaiableVersionHeaders) GoString() string {590 return s.String()591}592func (s *ListAvaiableVersionHeaders) SetCommonHeaders(v map[string]*string) *ListAvaiableVersionHeaders {593 s.CommonHeaders = v594 return s595}596func (s *ListAvaiableVersionHeaders) SetXAcsDingtalkAccessToken(v string) *ListAvaiableVersionHeaders {597 s.XAcsDingtalkAccessToken = &v598 return s599}600type ListAvaiableVersionRequest struct {601 BundleId *string `json:"bundleId,omitempty" xml:"bundleId,omitempty"`602 MiniAppId *string `json:"miniAppId,omitempty" xml:"miniAppId,omitempty"`603 PageNum *int32 `json:"pageNum,omitempty" xml:"pageNum,omitempty"`604 PageSize *int32 `json:"pageSize,omitempty" xml:"pageSize,omitempty"`605 VersionTypeSet []*int32 `json:"versionTypeSet,omitempty" xml:"versionTypeSet,omitempty" type:"Repeated"`606}607func (s ListAvaiableVersionRequest) String() string {608 return tea.Prettify(s)609}610func (s ListAvaiableVersionRequest) GoString() string {611 return s.String()612}613func (s *ListAvaiableVersionRequest) SetBundleId(v string) *ListAvaiableVersionRequest {614 s.BundleId = &v615 return s616}617func (s *ListAvaiableVersionRequest) SetMiniAppId(v string) *ListAvaiableVersionRequest {618 s.MiniAppId = &v619 return s620}621func (s *ListAvaiableVersionRequest) SetPageNum(v int32) *ListAvaiableVersionRequest {622 s.PageNum = &v623 return s624}625func (s *ListAvaiableVersionRequest) SetPageSize(v int32) *ListAvaiableVersionRequest {626 s.PageSize = &v627 return s628}629func (s *ListAvaiableVersionRequest) SetVersionTypeSet(v []*int32) *ListAvaiableVersionRequest {630 s.VersionTypeSet = v631 return s632}633type ListAvaiableVersionResponseBody struct {634 // result635 Versions []*ListAvaiableVersionResponseBodyVersions `json:"versions,omitempty" xml:"versions,omitempty" type:"Repeated"`636}637func (s ListAvaiableVersionResponseBody) String() string {638 return tea.Prettify(s)639}640func (s ListAvaiableVersionResponseBody) GoString() string {641 return s.String()642}643func (s *ListAvaiableVersionResponseBody) SetVersions(v []*ListAvaiableVersionResponseBodyVersions) *ListAvaiableVersionResponseBody {644 s.Versions = v645 return s646}647type ListAvaiableVersionResponseBodyVersions struct {648 BuildStatus *int64 `json:"buildStatus,omitempty" xml:"buildStatus,omitempty"`649 H5Bundle *string `json:"h5Bundle,omitempty" xml:"h5Bundle,omitempty"`650 PackageSize *string `json:"packageSize,omitempty" xml:"packageSize,omitempty"`651 PackageUrl *string `json:"packageUrl,omitempty" xml:"packageUrl,omitempty"`652 Version *string `json:"version,omitempty" xml:"version,omitempty"`653}654func (s ListAvaiableVersionResponseBodyVersions) String() string {655 return tea.Prettify(s)656}657func (s ListAvaiableVersionResponseBodyVersions) GoString() string {658 return s.String()659}660func (s *ListAvaiableVersionResponseBodyVersions) SetBuildStatus(v int64) *ListAvaiableVersionResponseBodyVersions {661 s.BuildStatus = &v662 return s663}664func (s *ListAvaiableVersionResponseBodyVersions) SetH5Bundle(v string) *ListAvaiableVersionResponseBodyVersions {665 s.H5Bundle = &v666 return s667}668func (s *ListAvaiableVersionResponseBodyVersions) SetPackageSize(v string) *ListAvaiableVersionResponseBodyVersions {669 s.PackageSize = &v670 return s671}672func (s *ListAvaiableVersionResponseBodyVersions) SetPackageUrl(v string) *ListAvaiableVersionResponseBodyVersions {673 s.PackageUrl = &v674 return s675}676func (s *ListAvaiableVersionResponseBodyVersions) SetVersion(v string) *ListAvaiableVersionResponseBodyVersions {677 s.Version = &v678 return s679}680type ListAvaiableVersionResponse struct {681 Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty" require:"true"`682 Body *ListAvaiableVersionResponseBody `json:"body,omitempty" xml:"body,omitempty" require:"true"`683}684func (s ListAvaiableVersionResponse) String() string {685 return tea.Prettify(s)686}687func (s ListAvaiableVersionResponse) GoString() string {688 return s.String()689}690func (s *ListAvaiableVersionResponse) SetHeaders(v map[string]*string) *ListAvaiableVersionResponse {691 s.Headers = v692 return s693}694func (s *ListAvaiableVersionResponse) SetBody(v *ListAvaiableVersionResponseBody) *ListAvaiableVersionResponse {695 s.Body = v696 return s697}698type QueryHtmlBundleBuildHeaders struct {699 CommonHeaders map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`700 XAcsDingtalkAccessToken *string `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`701}702func (s QueryHtmlBundleBuildHeaders) String() string {703 return tea.Prettify(s)704}705func (s QueryHtmlBundleBuildHeaders) GoString() string {706 return s.String()707}708func (s *QueryHtmlBundleBuildHeaders) SetCommonHeaders(v map[string]*string) *QueryHtmlBundleBuildHeaders {709 s.CommonHeaders = v710 return s711}712func (s *QueryHtmlBundleBuildHeaders) SetXAcsDingtalkAccessToken(v string) *QueryHtmlBundleBuildHeaders {713 s.XAcsDingtalkAccessToken = &v714 return s715}716type QueryHtmlBundleBuildRequest struct {717 // bundleId718 BundleId *string `json:"bundleId,omitempty" xml:"bundleId,omitempty"`719 // miniAppId720 MiniAppId *string `json:"miniAppId,omitempty" xml:"miniAppId,omitempty"`721 // version722 Version *string `json:"version,omitempty" xml:"version,omitempty"`723}724func (s QueryHtmlBundleBuildRequest) String() string {725 return tea.Prettify(s)726}727func (s QueryHtmlBundleBuildRequest) GoString() string {728 return s.String()729}730func (s *QueryHtmlBundleBuildRequest) SetBundleId(v string) *QueryHtmlBundleBuildRequest {731 s.BundleId = &v732 return s733}734func (s *QueryHtmlBundleBuildRequest) SetMiniAppId(v string) *QueryHtmlBundleBuildRequest {735 s.MiniAppId = &v736 return s737}738func (s *QueryHtmlBundleBuildRequest) SetVersion(v string) *QueryHtmlBundleBuildRequest {739 s.Version = &v740 return s741}742type QueryHtmlBundleBuildResponseBody struct {743 Result *string `json:"result,omitempty" xml:"result,omitempty"`744}745func (s QueryHtmlBundleBuildResponseBody) String() string {746 return tea.Prettify(s)747}748func (s QueryHtmlBundleBuildResponseBody) GoString() string {749 return s.String()750}751func (s *QueryHtmlBundleBuildResponseBody) SetResult(v string) *QueryHtmlBundleBuildResponseBody {752 s.Result = &v753 return s754}755type QueryHtmlBundleBuildResponse struct {756 Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty" require:"true"`757 Body *QueryHtmlBundleBuildResponseBody `json:"body,omitempty" xml:"body,omitempty" require:"true"`758}759func (s QueryHtmlBundleBuildResponse) String() string {760 return tea.Prettify(s)761}762func (s QueryHtmlBundleBuildResponse) GoString() string {763 return s.String()764}765func (s *QueryHtmlBundleBuildResponse) SetHeaders(v map[string]*string) *QueryHtmlBundleBuildResponse {766 s.Headers = v767 return s768}769func (s *QueryHtmlBundleBuildResponse) SetBody(v *QueryHtmlBundleBuildResponseBody) *QueryHtmlBundleBuildResponse {770 s.Body = v771 return s772}773type SetExtendSettingHeaders struct {774 CommonHeaders map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`775 XAcsDingtalkAccessToken *string `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`776}777func (s SetExtendSettingHeaders) String() string {778 return tea.Prettify(s)779}780func (s SetExtendSettingHeaders) GoString() string {781 return s.String()782}783func (s *SetExtendSettingHeaders) SetCommonHeaders(v map[string]*string) *SetExtendSettingHeaders {784 s.CommonHeaders = v785 return s786}787func (s *SetExtendSettingHeaders) SetXAcsDingtalkAccessToken(v string) *SetExtendSettingHeaders {788 s.XAcsDingtalkAccessToken = &v789 return s790}791type SetExtendSettingRequest struct {792 BuildH5Bundle *bool `json:"buildH5Bundle,omitempty" xml:"buildH5Bundle,omitempty"`793 MiniAppId *string `json:"miniAppId,omitempty" xml:"miniAppId,omitempty"`794}795func (s SetExtendSettingRequest) String() string {796 return tea.Prettify(s)797}798func (s SetExtendSettingRequest) GoString() string {799 return s.String()800}801func (s *SetExtendSettingRequest) SetBuildH5Bundle(v bool) *SetExtendSettingRequest {802 s.BuildH5Bundle = &v803 return s804}805func (s *SetExtendSettingRequest) SetMiniAppId(v string) *SetExtendSettingRequest {806 s.MiniAppId = &v807 return s808}809type SetExtendSettingResponseBody struct {810 Result *string `json:"result,omitempty" xml:"result,omitempty"`811}812func (s SetExtendSettingResponseBody) String() string {813 return tea.Prettify(s)814}815func (s SetExtendSettingResponseBody) GoString() string {816 return s.String()817}818func (s *SetExtendSettingResponseBody) SetResult(v string) *SetExtendSettingResponseBody {819 s.Result = &v820 return s821}822type SetExtendSettingResponse struct {823 Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty" require:"true"`824 Body *SetExtendSettingResponseBody `json:"body,omitempty" xml:"body,omitempty" require:"true"`825}826func (s SetExtendSettingResponse) String() string {827 return tea.Prettify(s)828}829func (s SetExtendSettingResponse) GoString() string {830 return s.String()831}832func (s *SetExtendSettingResponse) SetHeaders(v map[string]*string) *SetExtendSettingResponse {833 s.Headers = v834 return s835}836func (s *SetExtendSettingResponse) SetBody(v *SetExtendSettingResponseBody) *SetExtendSettingResponse {837 s.Body = v838 return s839}840type UpdateVersionStatusHeaders struct {841 CommonHeaders map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`842 XAcsDingtalkAccessToken *string `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`843}844func (s UpdateVersionStatusHeaders) String() string {845 return tea.Prettify(s)846}847func (s UpdateVersionStatusHeaders) GoString() string {848 return s.String()849}850func (s *UpdateVersionStatusHeaders) SetCommonHeaders(v map[string]*string) *UpdateVersionStatusHeaders {851 s.CommonHeaders = v852 return s853}854func (s *UpdateVersionStatusHeaders) SetXAcsDingtalkAccessToken(v string) *UpdateVersionStatusHeaders {855 s.XAcsDingtalkAccessToken = &v856 return s857}858type UpdateVersionStatusRequest struct {859 BundleId *string `json:"bundleId,omitempty" xml:"bundleId,omitempty"`860 MiniAppId *string `json:"miniAppId,omitempty" xml:"miniAppId,omitempty"`861 Version *string `json:"version,omitempty" xml:"version,omitempty"`862 VersionType *int32 `json:"versionType,omitempty" xml:"versionType,omitempty"`863}864func (s UpdateVersionStatusRequest) String() string {865 return tea.Prettify(s)866}867func (s UpdateVersionStatusRequest) GoString() string {868 return s.String()869}870func (s *UpdateVersionStatusRequest) SetBundleId(v string) *UpdateVersionStatusRequest {871 s.BundleId = &v872 return s873}874func (s *UpdateVersionStatusRequest) SetMiniAppId(v string) *UpdateVersionStatusRequest {875 s.MiniAppId = &v876 return s877}878func (s *UpdateVersionStatusRequest) SetVersion(v string) *UpdateVersionStatusRequest {879 s.Version = &v880 return s881}882func (s *UpdateVersionStatusRequest) SetVersionType(v int32) *UpdateVersionStatusRequest {883 s.VersionType = &v884 return s885}886type UpdateVersionStatusResponseBody struct {887 Result *string `json:"result,omitempty" xml:"result,omitempty"`888}889func (s UpdateVersionStatusResponseBody) String() string {890 return tea.Prettify(s)891}892func (s UpdateVersionStatusResponseBody) GoString() string {893 return s.String()894}895func (s *UpdateVersionStatusResponseBody) SetResult(v string) *UpdateVersionStatusResponseBody {896 s.Result = &v897 return s898}899type UpdateVersionStatusResponse struct {900 Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty" require:"true"`901 Body *UpdateVersionStatusResponseBody `json:"body,omitempty" xml:"body,omitempty" require:"true"`902}903func (s UpdateVersionStatusResponse) String() string {904 return tea.Prettify(s)905}906func (s UpdateVersionStatusResponse) GoString() string {907 return s.String()908}909func (s *UpdateVersionStatusResponse) SetHeaders(v map[string]*string) *UpdateVersionStatusResponse {910 s.Headers = v911 return s912}913func (s *UpdateVersionStatusResponse) SetBody(v *UpdateVersionStatusResponseBody) *UpdateVersionStatusResponse {914 s.Body = v915 return s916}917type Client struct {918 openapi.Client919}920func NewClient(config *openapi.Config) (*Client, error) {921 client := new(Client)922 err := client.Init(config)923 return client, err924}925func (client *Client) Init(config *openapi.Config) (_err error) {926 _err = client.Client.Init(config)927 if _err != nil {928 return _err929 }930 client.EndpointRule = tea.String("")931 if tea.BoolValue(util.Empty(client.Endpoint)) {932 client.Endpoint = tea.String("api.dingtalk.com")933 }934 return nil935}936func (client *Client) CreateMiniApp(request *CreateMiniAppRequest) (_result *CreateMiniAppResponse, _err error) {937 runtime := &util.RuntimeOptions{}938 headers := &CreateMiniAppHeaders{}939 _result = &CreateMiniAppResponse{}940 _body, _err := client.CreateMiniAppWithOptions(request, headers, runtime)941 if _err != nil {942 return _result, _err943 }944 _result = _body945 return _result, _err946}947func (client *Client) CreateMiniAppWithOptions(request *CreateMiniAppRequest, headers *CreateMiniAppHeaders, runtime *util.RuntimeOptions) (_result *CreateMiniAppResponse, _err error) {948 _err = util.ValidateModel(request)949 if _err != nil {950 return _result, _err951 }952 body := map[string]interface{}{}953 if !tea.BoolValue(util.IsUnset(request.BizId)) {954 body["bizId"] = request.BizId955 }956 if !tea.BoolValue(util.IsUnset(request.BizType)) {957 body["bizType"] = request.BizType958 }959 if !tea.BoolValue(util.IsUnset(request.BundleId)) {960 body["bundleId"] = request.BundleId961 }962 if !tea.BoolValue(util.IsUnset(request.Desc)) {963 body["desc"] = request.Desc964 }965 if !tea.BoolValue(util.IsUnset(request.Icon)) {966 body["icon"] = request.Icon967 }968 if !tea.BoolValue(util.IsUnset(request.Name)) {969 body["name"] = request.Name970 }971 realHeaders := make(map[string]*string)972 if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {973 realHeaders = headers.CommonHeaders974 }975 if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {976 realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)977 }978 req := &openapi.OpenApiRequest{979 Headers: realHeaders,980 Body: openapiutil.ParseToMap(body),981 }982 _result = &CreateMiniAppResponse{}983 _body, _err := client.DoROARequest(tea.String("CreateMiniApp"), tea.String("miniapp_1.0"), tea.String("HTTP"), tea.String("POST"), tea.String("AK"), tea.String("/v1.0/miniapp/apps"), tea.String("json"), req, runtime)984 if _err != nil {985 return _result, _err986 }987 _err = tea.Convert(_body, &_result)988 return _result, _err989}990func (client *Client) CreateMiniAppPlugin(request *CreateMiniAppPluginRequest) (_result *CreateMiniAppPluginResponse, _err error) {991 runtime := &util.RuntimeOptions{}992 headers := &CreateMiniAppPluginHeaders{}993 _result = &CreateMiniAppPluginResponse{}994 _body, _err := client.CreateMiniAppPluginWithOptions(request, headers, runtime)995 if _err != nil {996 return _result, _err997 }998 _result = _body999 return _result, _err1000}1001func (client *Client) CreateMiniAppPluginWithOptions(request *CreateMiniAppPluginRequest, headers *CreateMiniAppPluginHeaders, runtime *util.RuntimeOptions) (_result *CreateMiniAppPluginResponse, _err error) {1002 _err = util.ValidateModel(request)1003 if _err != nil {1004 return _result, _err1005 }1006 body := map[string]interface{}{}1007 if !tea.BoolValue(util.IsUnset(request.BizId)) {1008 body["bizId"] = request.BizId1009 }1010 if !tea.BoolValue(util.IsUnset(request.BizType)) {1011 body["bizType"] = request.BizType1012 }1013 if !tea.BoolValue(util.IsUnset(request.BundleId)) {1014 body["bundleId"] = request.BundleId1015 }1016 if !tea.BoolValue(util.IsUnset(request.Desc)) {1017 body["desc"] = request.Desc1018 }1019 if !tea.BoolValue(util.IsUnset(request.Icon)) {1020 body["icon"] = request.Icon1021 }1022 if !tea.BoolValue(util.IsUnset(request.Name)) {1023 body["name"] = request.Name1024 }1025 realHeaders := make(map[string]*string)1026 if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {1027 realHeaders = headers.CommonHeaders1028 }1029 if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {1030 realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)1031 }1032 req := &openapi.OpenApiRequest{1033 Headers: realHeaders,1034 Body: openapiutil.ParseToMap(body),1035 }1036 _result = &CreateMiniAppPluginResponse{}1037 _body, _err := client.DoROARequest(tea.String("CreateMiniAppPlugin"), tea.String("miniapp_1.0"), tea.String("HTTP"), tea.String("POST"), tea.String("AK"), tea.String("/v1.0/miniapp/plugins"), tea.String("json"), req, runtime)1038 if _err != nil {1039 return _result, _err1040 }1041 _err = tea.Convert(_body, &_result)1042 return _result, _err1043}1044func (client *Client) CreateVersionAcrossBundle(request *CreateVersionAcrossBundleRequest) (_result *CreateVersionAcrossBundleResponse, _err error) {1045 runtime := &util.RuntimeOptions{}1046 headers := &CreateVersionAcrossBundleHeaders{}1047 _result = &CreateVersionAcrossBundleResponse{}1048 _body, _err := client.CreateVersionAcrossBundleWithOptions(request, headers, runtime)1049 if _err != nil {1050 return _result, _err1051 }1052 _result = _body1053 return _result, _err1054}1055func (client *Client) CreateVersionAcrossBundleWithOptions(request *CreateVersionAcrossBundleRequest, headers *CreateVersionAcrossBundleHeaders, runtime *util.RuntimeOptions) (_result *CreateVersionAcrossBundleResponse, _err error) {1056 _err = util.ValidateModel(request)1057 if _err != nil {1058 return _result, _err1059 }1060 body := map[string]interface{}{}1061 if !tea.BoolValue(util.IsUnset(request.BundleId)) {1062 body["bundleId"] = request.BundleId1063 }1064 if !tea.BoolValue(util.IsUnset(request.MiniAppId)) {1065 body["miniAppId"] = request.MiniAppId1066 }1067 if !tea.BoolValue(util.IsUnset(request.SourceBundleId)) {1068 body["sourceBundleId"] = request.SourceBundleId1069 }1070 if !tea.BoolValue(util.IsUnset(request.SourceVersion)) {1071 body["sourceVersion"] = request.SourceVersion1072 }1073 if !tea.BoolValue(util.IsUnset(request.Version)) {1074 body["version"] = request.Version1075 }1076 realHeaders := make(map[string]*string)1077 if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {1078 realHeaders = headers.CommonHeaders1079 }1080 if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {1081 realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)1082 }1083 req := &openapi.OpenApiRequest{1084 Headers: realHeaders,1085 Body: openapiutil.ParseToMap(body),1086 }1087 _result = &CreateVersionAcrossBundleResponse{}1088 _body, _err := client.DoROARequest(tea.String("CreateVersionAcrossBundle"), tea.String("miniapp_1.0"), tea.String("HTTP"), tea.String("POST"), tea.String("AK"), tea.String("/v1.0/miniapp/versions/createAcrossBundle"), tea.String("json"), req, runtime)1089 if _err != nil {1090 return _result, _err1091 }1092 _err = tea.Convert(_body, &_result)1093 return _result, _err1094}1095func (client *Client) GetMaxVersion(request *GetMaxVersionRequest) (_result *GetMaxVersionResponse, _err error) {1096 runtime := &util.RuntimeOptions{}1097 headers := &GetMaxVersionHeaders{}1098 _result = &GetMaxVersionResponse{}1099 _body, _err := client.GetMaxVersionWithOptions(request, headers, runtime)1100 if _err != nil {1101 return _result, _err1102 }1103 _result = _body1104 return _result, _err1105}1106func (client *Client) GetMaxVersionWithOptions(request *GetMaxVersionRequest, headers *GetMaxVersionHeaders, runtime *util.RuntimeOptions) (_result *GetMaxVersionResponse, _err error) {1107 _err = util.ValidateModel(request)1108 if _err != nil {1109 return _result, _err1110 }1111 query := map[string]interface{}{}1112 if !tea.BoolValue(util.IsUnset(request.BundleId)) {1113 query["bundleId"] = request.BundleId1114 }1115 if !tea.BoolValue(util.IsUnset(request.MiniAppId)) {1116 query["miniAppId"] = request.MiniAppId1117 }1118 if !tea.BoolValue(util.IsUnset(request.Version)) {1119 query["version"] = request.Version1120 }1121 realHeaders := make(map[string]*string)1122 if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {1123 realHeaders = headers.CommonHeaders1124 }1125 if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {1126 realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)1127 }1128 req := &openapi.OpenApiRequest{1129 Headers: realHeaders,1130 Query: openapiutil.Query(query),1131 }1132 _result = &GetMaxVersionResponse{}1133 _body, _err := client.DoROARequest(tea.String("GetMaxVersion"), tea.String("miniapp_1.0"), tea.String("HTTP"), tea.String("GET"), tea.String("AK"), tea.String("/v1.0/miniapp/apps/maxVersions"), tea.String("json"), req, runtime)1134 if _err != nil {1135 return _result, _err1136 }1137 _err = tea.Convert(_body, &_result)1138 return _result, _err1139}1140func (client *Client) GetMiniAppMetaData(request *GetMiniAppMetaDataRequest) (_result *GetMiniAppMetaDataResponse, _err error) {1141 runtime := &util.RuntimeOptions{}1142 headers := &GetMiniAppMetaDataHeaders{}1143 _result = &GetMiniAppMetaDataResponse{}1144 _body, _err := client.GetMiniAppMetaDataWithOptions(request, headers, runtime)1145 if _err != nil {1146 return _result, _err1147 }1148 _result = _body1149 return _result, _err1150}1151func (client *Client) GetMiniAppMetaDataWithOptions(request *GetMiniAppMetaDataRequest, headers *GetMiniAppMetaDataHeaders, runtime *util.RuntimeOptions) (_result *GetMiniAppMetaDataResponse, _err error) {1152 _err = util.ValidateModel(request)1153 if _err != nil {1154 return _result, _err1155 }1156 body := map[string]interface{}{}1157 if !tea.BoolValue(util.IsUnset(request.BundleId)) {1158 body["bundleId"] = request.BundleId1159 }1160 if !tea.BoolValue(util.IsUnset(request.BundleIdTableGmtModified)) {1161 body["bundleIdTableGmtModified"] = request.BundleIdTableGmtModified1162 }1163 if !tea.BoolValue(util.IsUnset(request.FromAppName)) {1164 body["fromAppName"] = request.FromAppName1165 }1166 if !tea.BoolValue(util.IsUnset(request.MiniAppIdTableGmtModified)) {1167 body["miniAppIdTableGmtModified"] = request.MiniAppIdTableGmtModified1168 }1169 realHeaders := make(map[string]*string)1170 if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {1171 realHeaders = headers.CommonHeaders1172 }1173 if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {1174 realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)1175 }1176 req := &openapi.OpenApiRequest{1177 Headers: realHeaders,1178 Body: openapiutil.ParseToMap(body),1179 }1180 _result = &GetMiniAppMetaDataResponse{}1181 _body, _err := client.DoROARequest(tea.String("GetMiniAppMetaData"), tea.String("miniapp_1.0"), tea.String("HTTP"), tea.String("POST"), tea.String("AK"), tea.String("/v1.0/miniapp/apps/metadata"), tea.String("json"), req, runtime)1182 if _err != nil {1183 return _result, _err1184 }1185 _err = tea.Convert(_body, &_result)1186 return _result, _err1187}1188func (client *Client) GetSettingByMiniAppId(miniAppId *string) (_result *GetSettingByMiniAppIdResponse, _err error) {1189 runtime := &util.RuntimeOptions{}1190 headers := &GetSettingByMiniAppIdHeaders{}1191 _result = &GetSettingByMiniAppIdResponse{}1192 _body, _err := client.GetSettingByMiniAppIdWithOptions(miniAppId, headers, runtime)1193 if _err != nil {1194 return _result, _err1195 }1196 _result = _body1197 return _result, _err1198}1199func (client *Client) GetSettingByMiniAppIdWithOptions(miniAppId *string, headers *GetSettingByMiniAppIdHeaders, runtime *util.RuntimeOptions) (_result *GetSettingByMiniAppIdResponse, _err error) {1200 miniAppId = openapiutil.GetEncodeParam(miniAppId)1201 realHeaders := make(map[string]*string)1202 if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {1203 realHeaders = headers.CommonHeaders1204 }1205 if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {1206 realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)1207 }1208 req := &openapi.OpenApiRequest{1209 Headers: realHeaders,1210 }1211 _result = &GetSettingByMiniAppIdResponse{}1212 _body, _err := client.DoROARequest(tea.String("GetSettingByMiniAppId"), tea.String("miniapp_1.0"), tea.String("HTTP"), tea.String("GET"), tea.String("AK"), tea.String("/v1.0/miniapp/apps/settings"), tea.String("json"), req, runtime)1213 if _err != nil {1214 return _result, _err1215 }1216 _err = tea.Convert(_body, &_result)1217 return _result, _err1218}1219func (client *Client) InvokeHtmlBundleBuild(request *InvokeHtmlBundleBuildRequest) (_result *InvokeHtmlBundleBuildResponse, _err error) {1220 runtime := &util.RuntimeOptions{}1221 headers := &InvokeHtmlBundleBuildHeaders{}1222 _result = &InvokeHtmlBundleBuildResponse{}1223 _body, _err := client.InvokeHtmlBundleBuildWithOptions(request, headers, runtime)1224 if _err != nil {1225 return _result, _err1226 }1227 _result = _body1228 return _result, _err1229}1230func (client *Client) InvokeHtmlBundleBuildWithOptions(request *InvokeHtmlBundleBuildRequest, headers *InvokeHtmlBundleBuildHeaders, runtime *util.RuntimeOptions) (_result *InvokeHtmlBundleBuildResponse, _err error) {1231 _err = util.ValidateModel(request)1232 if _err != nil {1233 return _result, _err1234 }1235 body := map[string]interface{}{}1236 if !tea.BoolValue(util.IsUnset(request.BundleId)) {1237 body["bundleId"] = request.BundleId1238 }1239 if !tea.BoolValue(util.IsUnset(request.MiniAppId)) {1240 body["miniAppId"] = request.MiniAppId1241 }1242 if !tea.BoolValue(util.IsUnset(request.Version)) {1243 body["version"] = request.Version1244 }1245 realHeaders := make(map[string]*string)1246 if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {1247 realHeaders = headers.CommonHeaders1248 }1249 if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {1250 realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)1251 }1252 req := &openapi.OpenApiRequest{1253 Headers: realHeaders,1254 Body: openapiutil.ParseToMap(body),1255 }1256 _result = &InvokeHtmlBundleBuildResponse{}1257 _body, _err := client.DoROARequest(tea.String("InvokeHtmlBundleBuild"), tea.String("miniapp_1.0"), tea.String("HTTP"), tea.String("POST"), tea.String("AK"), tea.String("/v1.0/miniapp/h5Bundles/build"), tea.String("json"), req, runtime)1258 if _err != nil {1259 return _result, _err1260 }1261 _err = tea.Convert(_body, &_result)1262 return _result, _err1263}1264func (client *Client) ListAvaiableVersion(request *ListAvaiableVersionRequest) (_result *ListAvaiableVersionResponse, _err error) {1265 runtime := &util.RuntimeOptions{}1266 headers := &ListAvaiableVersionHeaders{}1267 _result = &ListAvaiableVersionResponse{}1268 _body, _err := client.ListAvaiableVersionWithOptions(request, headers, runtime)1269 if _err != nil {1270 return _result, _err1271 }1272 _result = _body1273 return _result, _err1274}1275func (client *Client) ListAvaiableVersionWithOptions(request *ListAvaiableVersionRequest, headers *ListAvaiableVersionHeaders, runtime *util.RuntimeOptions) (_result *ListAvaiableVersionResponse, _err error) {1276 _err = util.ValidateModel(request)1277 if _err != nil {1278 return _result, _err1279 }1280 body := map[string]interface{}{}1281 if !tea.BoolValue(util.IsUnset(request.BundleId)) {1282 body["bundleId"] = request.BundleId1283 }1284 if !tea.BoolValue(util.IsUnset(request.MiniAppId)) {1285 body["miniAppId"] = request.MiniAppId1286 }1287 if !tea.BoolValue(util.IsUnset(request.PageNum)) {1288 body["pageNum"] = request.PageNum1289 }1290 if !tea.BoolValue(util.IsUnset(request.PageSize)) {1291 body["pageSize"] = request.PageSize1292 }1293 if !tea.BoolValue(util.IsUnset(request.VersionTypeSet)) {1294 body["versionTypeSet"] = request.VersionTypeSet1295 }1296 realHeaders := make(map[string]*string)1297 if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {1298 realHeaders = headers.CommonHeaders1299 }1300 if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {1301 realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)1302 }1303 req := &openapi.OpenApiRequest{1304 Headers: realHeaders,1305 Body: openapiutil.ParseToMap(body),1306 }1307 _result = &ListAvaiableVersionResponse{}1308 _body, _err := client.DoROARequest(tea.String("ListAvaiableVersion"), tea.String("miniapp_1.0"), tea.String("HTTP"), tea.String("POST"), tea.String("AK"), tea.String("/v1.0/miniapp/apps/versions/query"), tea.String("json"), req, runtime)1309 if _err != nil {1310 return _result, _err1311 }1312 _err = tea.Convert(_body, &_result)1313 return _result, _err1314}1315func (client *Client) QueryHtmlBundleBuild(request *QueryHtmlBundleBuildRequest) (_result *QueryHtmlBundleBuildResponse, _err error) {1316 runtime := &util.RuntimeOptions{}1317 headers := &QueryHtmlBundleBuildHeaders{}1318 _result = &QueryHtmlBundleBuildResponse{}1319 _body, _err := client.QueryHtmlBundleBuildWithOptions(request, headers, runtime)1320 if _err != nil {1321 return _result, _err1322 }1323 _result = _body1324 return _result, _err1325}1326func (client *Client) QueryHtmlBundleBuildWithOptions(request *QueryHtmlBundleBuildRequest, headers *QueryHtmlBundleBuildHeaders, runtime *util.RuntimeOptions) (_result *QueryHtmlBundleBuildResponse, _err error) {1327 _err = util.ValidateModel(request)1328 if _err != nil {1329 return _result, _err1330 }1331 query := map[string]interface{}{}1332 if !tea.BoolValue(util.IsUnset(request.BundleId)) {1333 query["bundleId"] = request.BundleId1334 }1335 if !tea.BoolValue(util.IsUnset(request.MiniAppId)) {1336 query["miniAppId"] = request.MiniAppId1337 }1338 if !tea.BoolValue(util.IsUnset(request.Version)) {1339 query["version"] = request.Version1340 }1341 realHeaders := make(map[string]*string)1342 if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {1343 realHeaders = headers.CommonHeaders1344 }1345 if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {1346 realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)1347 }1348 req := &openapi.OpenApiRequest{1349 Headers: realHeaders,1350 Query: openapiutil.Query(query),1351 }1352 _result = &QueryHtmlBundleBuildResponse{}1353 _body, _err := client.DoROARequest(tea.String("QueryHtmlBundleBuild"), tea.String("miniapp_1.0"), tea.String("HTTP"), tea.String("GET"), tea.String("AK"), tea.String("/v1.0/miniapp/h5Bundles/buildResults"), tea.String("json"), req, runtime)1354 if _err != nil {1355 return _result, _err1356 }1357 _err = tea.Convert(_body, &_result)1358 return _result, _err1359}1360func (client *Client) SetExtendSetting(request *SetExtendSettingRequest) (_result *SetExtendSettingResponse, _err error) {1361 runtime := &util.RuntimeOptions{}1362 headers := &SetExtendSettingHeaders{}1363 _result = &SetExtendSettingResponse{}1364 _body, _err := client.SetExtendSettingWithOptions(request, headers, runtime)1365 if _err != nil {1366 return _result, _err1367 }1368 _result = _body1369 return _result, _err1370}1371func (client *Client) SetExtendSettingWithOptions(request *SetExtendSettingRequest, headers *SetExtendSettingHeaders, runtime *util.RuntimeOptions) (_result *SetExtendSettingResponse, _err error) {1372 _err = util.ValidateModel(request)1373 if _err != nil {1374 return _result, _err1375 }1376 body := map[string]interface{}{}1377 if !tea.BoolValue(util.IsUnset(request.BuildH5Bundle)) {1378 body["buildH5Bundle"] = request.BuildH5Bundle1379 }1380 if !tea.BoolValue(util.IsUnset(request.MiniAppId)) {1381 body["miniAppId"] = request.MiniAppId1382 }1383 realHeaders := make(map[string]*string)1384 if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {1385 realHeaders = headers.CommonHeaders1386 }1387 if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {1388 realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)1389 }1390 req := &openapi.OpenApiRequest{1391 Headers: realHeaders,1392 Body: openapiutil.ParseToMap(body),1393 }1394 _result = &SetExtendSettingResponse{}1395 _body, _err := client.DoROARequest(tea.String("SetExtendSetting"), tea.String("miniapp_1.0"), tea.String("HTTP"), tea.String("PUT"), tea.String("AK"), tea.String("/v1.0/miniapp/apps/settings"), tea.String("json"), req, runtime)1396 if _err != nil {1397 return _result, _err1398 }1399 _err = tea.Convert(_body, &_result)1400 return _result, _err1401}1402func (client *Client) UpdateVersionStatus(request *UpdateVersionStatusRequest) (_result *UpdateVersionStatusResponse, _err error) {1403 runtime := &util.RuntimeOptions{}1404 headers := &UpdateVersionStatusHeaders{}1405 _result = &UpdateVersionStatusResponse{}1406 _body, _err := client.UpdateVersionStatusWithOptions(request, headers, runtime)1407 if _err != nil {1408 return _result, _err1409 }1410 _result = _body1411 return _result, _err1412}1413func (client *Client) UpdateVersionStatusWithOptions(request *UpdateVersionStatusRequest, headers *UpdateVersionStatusHeaders, runtime *util.RuntimeOptions) (_result *UpdateVersionStatusResponse, _err error) {1414 _err = util.ValidateModel(request)1415 if _err != nil {1416 return _result, _err1417 }1418 body := map[string]interface{}{}1419 if !tea.BoolValue(util.IsUnset(request.BundleId)) {1420 body["bundleId"] = request.BundleId1421 }1422 if !tea.BoolValue(util.IsUnset(request.MiniAppId)) {1423 body["miniAppId"] = request.MiniAppId1424 }1425 if !tea.BoolValue(util.IsUnset(request.Version)) {1426 body["version"] = request.Version1427 }1428 if !tea.BoolValue(util.IsUnset(request.VersionType)) {1429 body["versionType"] = request.VersionType1430 }1431 realHeaders := make(map[string]*string)1432 if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {1433 realHeaders = headers.CommonHeaders1434 }1435 if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {1436 realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)1437 }1438 req := &openapi.OpenApiRequest{1439 Headers: realHeaders,1440 Body: openapiutil.ParseToMap(body),1441 }1442 _result = &UpdateVersionStatusResponse{}1443 _body, _err := client.DoROARequest(tea.String("UpdateVersionStatus"), tea.String("miniapp_1.0"), tea.String("HTTP"), tea.String("POST"), tea.String("AK"), tea.String("/v1.0/miniapp/versions/status"), tea.String("json"), req, runtime)1444 if _err != nil {1445 return _result, _err1446 }1447 _err = tea.Convert(_body, &_result)1448 return _result, _err1449}...
header_test.go
Source:header_test.go
...33 for c := node.FirstChild; c != nil; c = c.NextSibling {34 traverse(c, processor)35 }36}37func TestHeadersExecute(t *testing.T) {38 processor := New("http://something.com")39 node, _ := html.Parse(strings.NewReader(htm))40 traverse(node, processor.(*Processor))41 if processor.(*Processor).headers["h1"] != 2 {42 t.Errorf("Headers is not set correctly Set:%v should be: h1:2", processor.(*Processor).headers)43 }44 processor = New("http://something.com")45 node, _ = html.Parse(strings.NewReader(htm2))46 traverse(node, processor.(*Processor))47 if processor.(*Processor).headers["h1"] != 1 && processor.(*Processor).headers["h2"] != 2 && processor.(*Processor).headers["h3"] != 1 {48 t.Errorf("Title is not set correctly Set:%v should be: h1:1 h2:2 h3:1", processor.(*Processor).headers)49 }50}51func TestGetPluginName(t *testing.T) {52 processor := &Processor{}53 if processor.GetProcessorName() != "Headers" {54 t.Errorf("Plugin name should be Headers found %v", processor.GetProcessorName())55 }56}57func TestGetPluginJSON(t *testing.T) {58 processor := &Processor{59 headers: map[string]uint{60 "h1": 1,61 },62 }63 if data, err := processor.MarshalJSON(); err != nil || string(data) != "{\"h1\":1}" {64 t.Errorf("MarshalJSON should return {\"h1\":1} found: %v", string(data))65 }66}...
header.go
Source:header.go
...5 "sync"6 "github.com/samtholiya/analyserService/internal/service/analyser/html/plugin"7 htmlNative "golang.org/x/net/html"8)9const name = "Headers"10var regex *regexp.Regexp11func init() {12 plugin.RegisterProcessor(name, New)13 var err error14 regex, err = regexp.Compile(`h\d+`)15 if err != nil {16 panic(err)17 }18}19func (p *Processor) GetProcessorName() string {20 return name21}22func New(url string) plugin.ProcessorInterface {23 return &Processor{...
Headers
Using AI Code Generation
1import (2func main() {3 page, _ := ioutil.ReadAll(res.Body)4 res.Body.Close()5 fmt.Printf("%s", page)6}7import (8func main() {9 page, _ := ioutil.ReadAll(res.Body)10 res.Body.Close()11 fmt.Printf("%s", page)12}13import (14func main() {15 page, _ := ioutil.ReadAll(res.Body)16 res.Body.Close()17 fmt.Printf("%s", page)18}19import (20func main() {21 page, _ := ioutil.ReadAll(res.Body)22 res.Body.Close()23 fmt.Printf("%s", page)24}25import (26func main() {27 page, _ := ioutil.ReadAll(res.Body)28 res.Body.Close()29 fmt.Printf("%s", page)30}31import (32func main() {33 page, _ := ioutil.ReadAll(res.Body)34 res.Body.Close()35 fmt.Printf("%s", page)36}37import (38func main() {39 page, _ := ioutil.ReadAll(res.Body)40 res.Body.Close()41 fmt.Printf("%s",
Headers
Using AI Code Generation
1import (2func main() {3 if err != nil {4 log.Fatal(err)5 }6 doc.Find("a").Each(func(index int, item *goquery.Selection) {7 href, exists := item.Attr("href")8 if exists {9 fmt.Println(href)10 }11 })12}13import (14func main() {15 if err != nil {16 log.Fatal(err)17 }18 doc.Find("a").Each(func(index int, item *goquery.Selection) {19 href, exists := item.Attr("href")20 if exists {21 fmt.Println(href)22 }23 })24}25import (26func main() {27 if err != nil {28 log.Fatal(err)29 }30 doc.Find("a").Each(func(index int, item *goquery.Selection) {31 href, exists := item.Attr("href")32 if exists {33 fmt.Println(href)34 }35 })36}37import (38func main() {39 if err != nil {40 log.Fatal(err)41 }42 doc.Find("a").Each(func(index int, item *goquery.Selection) {43 href, exists := item.Attr("href")44 if exists {45 fmt.Println(href)46 }47 })48}49import (50func main() {
Headers
Using AI Code Generation
1import (2func main() {3 if err != nil {4 log.Fatal(err)5 }6 doc.Find("a").Each(func(i int, s *goquery.Selection) {7 band := s.Text()8 title := s.Text()9 fmt.Printf("Review %d: %s - %s10 })11}12import (13func main() {14 if err != nil {15 log.Fatal(err)16 }17 doc.Find("a").Each(func(i int, s *goquery.Selection) {18 band, _ := s.Attr("href")19 title := s.Text()20 fmt.Printf("Review %d: %s - %s21 })22}23import (24func main() {25 if err != nil {26 log.Fatal(err)27 }28 doc.Find("a").Each(func(i int, s *goquery.Selection) {29 band, _ := s.Attr("href")30 title := s.Text()31 fmt.Printf("Review %d: %s - %s32 })33}34import (35func main() {36 if err != nil {
Headers
Using AI Code Generation
1import (2func main() {3 if err != nil {4 fmt.Println(err)5 }6 defer resp.Body.Close()7 body, err := ioutil.ReadAll(resp.Body)8 if err != nil {9 fmt.Println(err)10 }11 fmt.Println(string(body))12 fmt.Println(resp.Header)13}
Headers
Using AI Code Generation
1import (2func main() {3 defer resp.Body.Close()4 body, _ := ioutil.ReadAll(resp.Body)5 fmt.Println(resp.Header)6 fmt.Println(string(body))7}8map[Cache-Control:[private, max-age=0] Content-Type:[text/html; charset=ISO-8859-1] Date:[Mon, 22 Apr 2019 08:11:58 GMT] Expires:[-1] P3p:[CP="This is not a P3P policy! See g.co/p3phelp for more info."] Server:[gws] Set-Cookie:[1P_JAR=2019-04-22-08; expires=Wed, 22-May-2019 08:11:58 GMT; path=/; domain=.google.com, NID=186=J5P5oFq3KjY5X5KzHtG4l7Q4b1h3VqgHjK0nV1RfXJcFVhjLbZzT7T6W8a0wJ1Q2QyjKs7YhX9sJ0n2d1zB5eN6W8Owv0b6D0e; expires=Tue, 21-Oct-2019 08:11:58 GMT; path=/; domain=.google.com; HttpOnly] X-Frame-Options:[SAMEORIGIN] X-Xss-Protection:[1; mode=block]]
Headers
Using AI Code Generation
1import (2func main() {3 if err != nil {4 panic(err)5 }6 defer resp.Body.Close()7 for k, v := range resp.Header {8 fmt.Printf("key[%s] value[%s]9 }10}11key[Content-Type] value[[text/html; charset=ISO-8859-1]]12key[Set-Cookie] value[[1P_JAR=2020-05-21-12; expires=Sat, 20-Jun-2020 12:40:00 GMT; path=/; domain=.google.com; Secure, NID=203=ZD2o6X9jzF8Gy1Yq3q3JG1nZ6U8g6P7Z6Ufz6X9jzF8Gy1Yq3q3JG1nZ6U8g6P7Z6Ufz6X9jzF8Gy1Yq3q3JG1nZ6U8g6P7Z6Ufz6X9jzF8Gy1Yq3q3JG1nZ6U8g6P7Z6Ufz6X9jzF8Gy1Yq3q3JG1nZ6U8g6P7Z6Ufz6X9jzF8Gy1Yq3q3JG1nZ6U8g6P7Z6Ufz6X9jzF8Gy1Yq3q3JG1nZ6U8g6P7Z6Ufz6X9jzF8Gy1
Headers
Using AI Code Generation
1import (2func main() {3 if err != nil {4 panic(err)5 }6 defer resp.Body.Close()7 fmt.Println(headers)8 fmt.Println(headers["Content-Type"])9 fmt.Println(headers["Content-Length"])10 fmt.Println(headers["Date"])11 fmt.Println(headers["Server"])12 fmt.Println(headers["Set-Cookie"])13 fmt.Println(headers["Vary"])14 fmt.Println(headers["X-Content-Type-Options"])15 fmt.Println(headers["X-Frame-Options"])16 fmt.Println(headers["X-Xss-Protection"])17 body, err := ioutil.ReadAll(resp.Body)18 if err != nil {19 panic(err)20 }21 fmt.Println(string(body))22}23map[Content-Type:[text/html; charset=utf-8] Content-Length:[10159] Date:[Thu, 09 Jul 2020 05:33:15 GMT] Server:[nginx] Set-Cookie:[__cfduid=d4c8a8a2d2a7b2d2c2d0a8e3a0e3e7b3a1594299195; expires=Sat, 08-Aug-20 05:33:15 GMT; path=/; domain=.golangprograms.com; HttpOnly; SameSite=Lax __cfruid=7b9f9a8e8b2e2c0d1a0c1d8a8a4c6a7d7b9c9; path=/; domain=.golangprograms.com; HttpOnly; Secure; SameSite=Lax] Vary:[Accept-Encoding] X-Content-Type-Options:[nosniff] X-Frame-Options:[SAMEORIGIN] X-Xss-Protection:[1; mode=block]]24[text/html; charset=utf-8]25[__cfduid=d4c8a8a2d2a7b2d2c2d0a8e3a0e3e7b3a1594299195; expires=Sat, 08-Aug-20 05:33:15 GMT; path=/;
Headers
Using AI Code Generation
1import (2func main() {3 resp, err := http.Get(url)4 if err != nil {5 fmt.Println(err)6 }7 defer resp.Body.Close()8 fmt.Println(resp.Header)9 fmt.Println("Content Length:", resp.ContentLength)10 fmt.Println("Status Code:", resp.StatusCode)11 fmt.Println("Status:", resp.Status)12 fmt.Println("Proto:", resp.Proto)13 fmt.Println("ProtoMajor:", resp.ProtoMajor)14 fmt.Println("ProtoMinor:", resp.ProtoMinor)15 fmt.Println("TransferEncoding:", resp.TransferEncoding)16 fmt.Println("Uncompressed:", resp.Uncompressed)17 fmt.Println("Trailer:", resp.Trailer)18 fmt.Println("Request:", resp.Request)19 fmt.Println("TLS:", resp.TLS)20 fmt.Println("Close:", resp.Close)21 fmt.Println("ContentLength:", resp.ContentLength)22 fmt.Println("TransferEncoding:", resp.TransferEncoding)23 fmt.Println("Uncompressed:", resp.Uncompressed)24 fmt.Println("Trailer:", resp.Trailer)25 fmt.Println("Request:", resp.Request)26 fmt.Println("TLS:", resp.TLS)27 fmt.Println("Close:", resp.Close)28 fmt.Println("ContentLength:", resp.ContentLength)29 fmt.Println("TransferEncoding:", resp.TransferEncoding)30 fmt.Println("Uncompressed:", resp.Uncompressed)31 fmt.Println("Trailer:", resp.Trailer)32 fmt.Println("Request:", resp.Request)33 fmt.Println("TLS:", resp.TLS)34 fmt.Println("Close:", resp.Close)35 fmt.Println("ContentLength:", resp.ContentLength)36 fmt.Println("TransferEncoding:", resp.TransferEncoding)37 fmt.Println("Uncompressed:", resp.Uncompressed)38 fmt.Println("Trailer:", resp.Trailer)39 fmt.Println("Request:", resp.Request)40 fmt.Println("TLS:", resp.TLS)41 fmt.Println("Close:", resp.Close)42 fmt.Println("ContentLength:", resp.ContentLength)43 fmt.Println("TransferEncoding:", resp.TransferEncoding)44 fmt.Println("Uncompressed:", resp.Uncompressed)45 fmt.Println("Trailer:", resp.Trailer)46 fmt.Println("Request:", resp.Request)47 fmt.Println("TLS:", resp.TLS)48 fmt.Println("Close:", resp.Close)49 fmt.Println("ContentLength:", resp.ContentLength)50 fmt.Println("TransferEncoding:", resp.TransferEncoding)51 fmt.Println("Uncompressed:", resp.Uncompressed)52 fmt.Println("Trailer:", resp.Trailer)53 fmt.Println("Request:", resp.Request)54 fmt.Println("TLS:", resp.TLS)
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!