@__dirname/pixiv-web-api
    Preparing search index...

    Function request

    • The basic request function, returns Response instance

      Parameters

      • endpoint: string
      • query: RequestQuery = {}

        an object to add to url search params

      • Optionaldata: any

        if data is falsy value, send GET request, otherwise send POST request

      • type: RequestType = "json"

        for adjusting request content-type, by default is json format

      Returns Promise<Response>