devowl-wp
    Preparing search index...
    • Create a uri builder and request function for your specific plugin depending on the rest root and additional parameters.

      Parameters

      Returns {
          request: <
              Request extends IRouteRequestInterface,
              Params extends IRouteParamsInterface,
              Response extends IRouteResponseInterface,
          >(
              passOptions: Omit<
                  {
                      allowBatchRequest?: | boolean
                      | Pick<
                          {
                              restNamespace: string;
                              restNonce?: string;
                              restPathObfuscateOffset?: string;
                              restQuery?: object;
                              restRecreateNonceEndpoint?: string;
                              restRoot: string;
                          } & {
                              onQueueItemFinished?: (state: ...) => ...;
                              signal?: AbortSignal;
                              waitForPromise?: Promise<(...)>;
                          },
                          "onQueueItemFinished"
                          | "waitForPromise",
                      >;
                      multipart?: boolean | MultiPartOptions;
                      params?: IRouteParamsInterface;
                      replayReason?: ReplayReason;
                      request?: IRouteRequestInterface;
                      sendReferer?: boolean;
                      sendRestNonce?: boolean;
                      settings?: Partial<{ -readonly [P in keyof Request]: Request[P] }>;
                  } & UrlBuilderArgs,
                  "options",
              > & Optional<
                  {
                      allowBatchRequest?: | boolean
                      | Pick<
                          {
                              restNamespace: string;
                              restNonce?: string;
                              restPathObfuscateOffset?: string;
                              restQuery?: object;
                              restRecreateNonceEndpoint?: string;
                              restRoot: string;
                          } & {
                              onQueueItemFinished?: (state: ...) => ...;
                              signal?: AbortSignal;
                              waitForPromise?: Promise<(...)>;
                          },
                          "onQueueItemFinished"
                          | "waitForPromise",
                      >;
                      multipart?: boolean | MultiPartOptions;
                      params?: IRouteParamsInterface;
                      replayReason?: ReplayReason;
                      request?: IRouteRequestInterface;
                      sendReferer?: boolean;
                      sendRestNonce?: boolean;
                      settings?: Partial<{ -readonly [P in keyof Request]: Request[P] }>;
                  } & UrlBuilderArgs,
                  "options",
              > & { params?: Params; request?: Request },
          ) => Promise<Response>;
          urlBuilder: (
              passOptions: Omit<{ nonce?: boolean } & UrlBuilderArgs, "options"> & Optional<
                  { nonce?: boolean } & UrlBuilderArgs,
                  "options",
              >,
          ) => string;
      }

      • urlBuilder
      • request