mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-08 14:03:53 +02:00
feat(plugins): use @tauri-apps namespace on NPM (#368)
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
This commit is contained in:
committed by
GitHub
parent
caf8456864
commit
22991af9f4
@@ -108,7 +108,7 @@ class Body {
|
||||
* Note that a file path must be allowed in the `fs` allowlist scope.
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { Body } from "tauri-plugin-http-api"
|
||||
* import { Body } from "@tauri-apps/plugin-http"
|
||||
* const body = Body.form({
|
||||
* key: 'value',
|
||||
* image: {
|
||||
@@ -169,7 +169,7 @@ class Body {
|
||||
* Creates a new JSON body.
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { Body } from "tauri-plugin-http-api"
|
||||
* import { Body } from "@tauri-apps/plugin-http"
|
||||
* Body.json({
|
||||
* registered: true,
|
||||
* name: 'tauri'
|
||||
@@ -188,7 +188,7 @@ class Body {
|
||||
* Creates a new UTF-8 string body.
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { Body } from "tauri-plugin-http-api"
|
||||
* import { Body } from "@tauri-apps/plugin-http"
|
||||
* Body.text('The body content as a string');
|
||||
* ```
|
||||
*
|
||||
@@ -204,7 +204,7 @@ class Body {
|
||||
* Creates a new byte array body.
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { Body } from "tauri-plugin-http-api"
|
||||
* import { Body } from "@tauri-apps/plugin-http"
|
||||
* Body.bytes(new Uint8Array([1, 2, 3]));
|
||||
* ```
|
||||
*
|
||||
@@ -308,7 +308,7 @@ class Client {
|
||||
* Drops the client instance.
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { getClient } from 'tauri-plugin-http-api';
|
||||
* import { getClient } from '@tauri-apps/plugin-http';
|
||||
* const client = await getClient();
|
||||
* await client.drop();
|
||||
* ```
|
||||
@@ -323,7 +323,7 @@ class Client {
|
||||
* Makes an HTTP request.
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { getClient } from 'tauri-plugin-http-api';
|
||||
* import { getClient } from '@tauri-apps/plugin-http';
|
||||
* const client = await getClient();
|
||||
* const response = await client.request({
|
||||
* method: 'GET',
|
||||
@@ -367,7 +367,7 @@ class Client {
|
||||
* Makes a GET request.
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { getClient, ResponseType } from 'tauri-plugin-http-api';
|
||||
* import { getClient, ResponseType } from '@tauri-apps/plugin-http';
|
||||
* const client = await getClient();
|
||||
* const response = await client.get('http://localhost:3003/users', {
|
||||
* timeout: 30,
|
||||
@@ -388,7 +388,7 @@ class Client {
|
||||
* Makes a POST request.
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { getClient, Body, ResponseType } from 'tauri-plugin-http-api';
|
||||
* import { getClient, Body, ResponseType } from '@tauri-apps/plugin-http';
|
||||
* const client = await getClient();
|
||||
* const response = await client.post('http://localhost:3003/users', {
|
||||
* body: Body.json({
|
||||
@@ -417,7 +417,7 @@ class Client {
|
||||
* Makes a PUT request.
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { getClient, Body } from 'tauri-plugin-http-api';
|
||||
* import { getClient, Body } from '@tauri-apps/plugin-http';
|
||||
* const client = await getClient();
|
||||
* const response = await client.put('http://localhost:3003/users/1', {
|
||||
* body: Body.form({
|
||||
@@ -447,7 +447,7 @@ class Client {
|
||||
* Makes a PATCH request.
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { getClient, Body } from 'tauri-plugin-http-api';
|
||||
* import { getClient, Body } from '@tauri-apps/plugin-http';
|
||||
* const client = await getClient();
|
||||
* const response = await client.patch('http://localhost:3003/users/1', {
|
||||
* body: Body.json({ email: 'contact@tauri.app' })
|
||||
@@ -466,7 +466,7 @@ class Client {
|
||||
* Makes a DELETE request.
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { getClient } from 'tauri-plugin-http-api';
|
||||
* import { getClient } from '@tauri-apps/plugin-http';
|
||||
* const client = await getClient();
|
||||
* const response = await client.delete('http://localhost:3003/users/1');
|
||||
* ```
|
||||
@@ -484,7 +484,7 @@ class Client {
|
||||
* Creates a new client using the specified options.
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { getClient } from 'tauri-plugin-http-api';
|
||||
* import { getClient } from '@tauri-apps/plugin-http';
|
||||
* const client = await getClient();
|
||||
* ```
|
||||
*
|
||||
@@ -507,7 +507,7 @@ let defaultClient: Client | null = null;
|
||||
* Perform an HTTP request using the default client.
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { fetch } from 'tauri-plugin-http-api';
|
||||
* import { fetch } from '@tauri-apps/plugin-http';
|
||||
* const response = await fetch('http://localhost:3003/users/2', {
|
||||
* method: 'GET',
|
||||
* timeout: 30,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "tauri-plugin-http-api",
|
||||
"name": "@tauri-apps/plugin-http",
|
||||
"version": "0.0.0",
|
||||
"license": "MIT or APACHE-2.0",
|
||||
"authors": [
|
||||
|
||||
Reference in New Issue
Block a user