MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / constructor

Method constructor

frontend/packages/common/src/utils/curl.ts:74–87  ·  view source on GitHub ↗

* @param curlStr curl 字符串 * @param options 配置项

(
    curlStr: string,
    options?: {
      ignoreDisabledHeaders: boolean
    }
  )

Source from the content-addressed store, hash-verified

72 * @param options 配置项
73 */
74 constructor(
75 curlStr: string,
76 options?: {
77 ignoreDisabledHeaders: boolean
78 }
79 ) {
80 this.curlStr = curlStr
81 this.options = options || this.options
82 this.validateCurl()
83 this.parseCurl()
84 this.ignoreDisabledHeader()
85 this.resetMethods()
86 this.parseObj.requestParams = this.getRequestBody2json()
87 }
88
89 /** 基础校验,验证 curl 字符串的合法性 */
90 validateCurl(): string | void {

Callers

nothing calls this directly

Calls 5

validateCurlMethod · 0.95
parseCurlMethod · 0.95
ignoreDisabledHeaderMethod · 0.95
resetMethodsMethod · 0.95
getRequestBody2jsonMethod · 0.95

Tested by

no test coverage detected