[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DYGW6VJF5B3590ED60P8KW":3,"skill-same:01M6DYGW6VJF5B3590ED60P8KW":92},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":28,"publishedAt":57,"linkOnly":58,"markdownContent":59,"markdownBody":60,"frontMatter":61,"refName":62,"commitSha":63,"skillDirectory":64,"forksCount":65,"repositoryHtmlUrl":66,"repositoryHomepageUrl":67,"ownerHtmlUrl":68,"ownerBlogUrl":69,"ownerDescription":70,"updatedAt":71,"install":72,"resources":85},"01M6DYGW6VJF5B3590ED60P8KW","fetch-and-send-data",null,"Call APIs, load data into components, and handle the async lifecycle in Blazor. USE FOR fetching data from a backend, submitting data to an API, displaying loading\u002Ferror states, registering HttpClient, building service abstractions for Auto\u002FWebAssembly render modes. DO NOT USE for form validation (see collect-user-input), prerendering persistence (see support-prerendering), or project scaffolding (see create-blazor-project).","managedcode\u002Fdotnet-skills","managedcode","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F78253589?v=4","01M6DYDJR3EG8KB5G4PC65XCTT","Managed Code","01M6DYDJX0ZT432N04NYJW89DN",515,"MIT","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FFrameworks\u002FOfficial-DotNet-Blazor\u002Fskills\u002Ffetch-and-send-data\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56],"send","data","fetch and send data","fetch","async","form validation","project scaffolding","loading","states","render","error","input","project","scaffolding","call","do","support","auto","backend","use","api","lifecycle","collect","validation","webassembly","blazor","create","components","2026-11-10 10:12:30",false,"---\nlicense: MIT\nname: fetch-and-send-data\ndescription: Call APIs, load data into components, and handle the async lifecycle in Blazor. USE FOR fetching data from a backend, submitting data to an API, displaying loading\u002Ferror states, registering HttpClient, building service abstractions for Auto\u002FWebAssembly render modes. DO NOT USE for form validation (see collect-user-input), prerendering persistence (see support-prerendering), or project scaffolding (see create-blazor-project).\n---\n\n# Fetch and Send Data\n\n## Step 1 — Read AGENTS.md\n\nCheck **Interactivity Mode** and **Scope**:\n\n| Mode | Data access |\n|------|-------------|\n| None (Static SSR) | Server-side: inject services\u002F`DbContext`. Use `[StreamRendering]` for loading UX. |\n| Server | Server-side: inject services\u002F`DbContext`. Guard prerender with `??=` + `[PersistentState]`. |\n| WebAssembly | Browser-side: `HttpClient` only. No direct server access. |\n| Auto | Both server and browser. Always go through an API. |\n\n## Step 2 — Register HttpClient\n\nOnly needed when calling external APIs from Server, or always for WebAssembly\u002FAuto. Server components accessing their own database should inject `DbContext` or a service directly.\n\n```csharp\n\u002F\u002F Named client — requires Microsoft.Extensions.Http NuGet\nbuilder.Services.AddHttpClient(\"CatalogAPI\", client =>\n{\n    client.BaseAddress = new Uri(\"https:\u002F\u002Fapi.example.com\u002F\");\n});\n\n\u002F\u002F Typed client\nbuilder.Services.AddHttpClient\u003CCatalogClient>(client =>\n    client.BaseAddress = new Uri(\"https:\u002F\u002Fapi.example.com\u002F\"));\n```\n\nFor WebAssembly\u002FAuto with prerendering, register in **both** server and `.Client` `Program.cs`.\n\n## Step 3 — Fetch Data\n\n### Simple load\n\n```razor\n@page \"\u002Fproducts\"\n@inject CatalogClient Catalog\n\n@if (products is null)\n{\n    \u003Cp>Loading…\u003C\u002Fp>\n}\nelse\n{\n    @foreach (var p in products)\n    {\n        \u003Cp>@p.Name — @p.Price.ToString(\"C\")\u003C\u002Fp>\n    }\n}\n\n@code {\n    private Product[]? products;\n\n    protected override async Task OnInitializedAsync()\n    {\n        products = await Catalog.GetProductsAsync();\n    }\n}\n```\n\nNo error handling needed in the simplest case — wrap the component usage in `\u003CErrorBoundary>` at the parent\u002Flayout level to catch unhandled exceptions.\n\n### Static SSR — StreamRendering\n\nWithout `[StreamRendering]`, the user sees nothing until `OnInitializedAsync` completes:\n\n```razor\n@attribute [StreamRendering]\n```\n\nOnly affects Static SSR. No effect on interactive components.\n\n### Prerendering guard\n\nPrerendering calls `OnInitializedAsync` twice. Skip the duplicate:\n\n```csharp\n[PersistentState] private Product[]? products;\n\nprotected override async Task OnInitializedAsync()\n{\n    products ??= await Catalog.GetProductsAsync();\n}\n```\n\nSee the `support-prerendering` skill for details.\n\n## Step 4 — Handle Errors\n\nUse `\u003CErrorBoundary>` as the default error strategy. It provides a consistent error experience across all components without any per-component catch logic. Wrap component usage at the layout or parent level:\n\n```razor\n\u003CErrorBoundary>\n    \u003CChildContent>\n        \u003CProductList \u002F>\n    \u003C\u002FChildContent>\n    \u003CErrorContent>\n        \u003Cdiv class=\"alert alert-danger\">Something went wrong. Please refresh.\u003C\u002Fdiv>\n    \u003C\u002FErrorContent>\n\u003C\u002FErrorBoundary>\n```\n\nNon-cancellation exceptions (`HttpRequestException`, etc.) propagate to `ErrorBoundary` automatically — no catch blocks needed in the component.\n\n### Cancellation is special\n\n`ComponentBase` silently swallows **all** `OperationCanceledException` — both self-initiated (disposal, parameter change) and external (HttpClient timeout). `ErrorBoundary` never sees them. This means:\n\n- Self-cancellation → silently ignored. Correct behavior, no action needed.\n- External cancellation (timeout) → also silently swallowed. Component gets stuck in loading state. Usually acceptable — timeouts are rare.\n\n### When to add in-component error handling\n\nOnly add catch blocks when the component needs behavior `ErrorBoundary` can't provide — typically **retries** or **timeout-specific messages**. Even then, only catch what you need:\n\n```csharp\n\u002F\u002F Catch only external cancellation (timeouts) — everything else flows to ErrorBoundary\ncatch (OperationCanceledException ex) when (!cancellationToken.IsCancellationRequested)\n{\n    Logger.LogWarning(ex, \"Request timed out for category {CategoryId}\", CategoryId);\n    error = \"The request timed out. Please try again.\";\n}\n```\n\nIf the component also needs to handle general errors with a retry button instead of letting `ErrorBoundary` take over:\n\n```csharp\ncatch (OperationCanceledException ex) when (!cancellationToken.IsCancellationRequested)\n{\n    Logger.LogWarning(ex, \"Request timed out for category {CategoryId}\", CategoryId);\n    error = \"The request timed out. Please try again.\";\n}\ncatch (Exception ex)\n{\n    Logger.LogError(ex, \"Failed to load products for category {CategoryId}\", CategoryId);\n    error = \"Unable to load products. Please try again.\";\n}\n```\n\n### Rules\n\n- **Never display `exception.Message`** — it may contain PII, connection strings, or internal details. Use hardcoded user-friendly messages.\n- **Always log through `ILogger`** — the real exception goes to the logging pipeline.\n- **Services must accept `CancellationToken`** — pass it to every async call so work stops when the component cancels.\n\n## Step 5 — Parameter-Driven Reloading\n\nWhen data depends on a route or query parameter that changes (e.g., navigating between `\u002Fproducts\u002F1` and `\u002Fproducts\u002F2`), use `OnParametersSetAsync` with a guard to skip reloads for parameters that don't affect data.\n\n### Pattern: cancel-and-reload with stale data overlay\n\n```razor\n@page \"\u002Fproducts\u002F{CategoryId:int}\"\n@implements IAsyncDisposable\n@inject ProductService ProductService\n@inject ILogger\u003CProducts> Logger\n\n@if (error is not null)\n{\n    \u003Cdiv class=\"alert alert-danger\">\n        \u003Cp>@error\u003C\u002Fp>\n        \u003Cbutton @onclick=\"LoadAsync\">Retry\u003C\u002Fbutton>\n    \u003C\u002Fdiv>\n}\nelse if (products is null)\n{\n    \u003Cp>Loading…\u003C\u002Fp>\n}\nelse\n{\n    @if (isLoading)\n    {\n        \u003Cp>\u003Cem>Refreshing…\u003C\u002Fem>\u003C\u002Fp>\n    }\n    @foreach (var p in products)\n    {\n        \u003Cp>@p.Name — @p.Price.ToString(\"C\")\u003C\u002Fp>\n    }\n}\n\n@code {\n    [Parameter] public int CategoryId { get; set; }\n    [SupplyParameterFromQuery] public string? ViewMode { get; set; } \u002F\u002F UI-only\n\n    private CancellationTokenSource? cts;\n    private int? loadedCategoryId;\n    private List\u003CProduct>? products;\n    private bool isLoading;\n    private string? error;\n\n    protected override async Task OnParametersSetAsync()\n    {\n        if (CategoryId == loadedCategoryId)\n        {\n            return; \u002F\u002F Only ViewMode changed — no reload\n        }\n\n        loadedCategoryId = CategoryId;\n        await LoadAsync();\n    }\n\n    private async Task LoadAsync()\n    {\n        if (cts is not null)\n        {\n            await cts.CancelAsync();\n            cts.Dispose();\n        }\n\n        cts = new CancellationTokenSource();\n        var cancellationToken = cts.Token; \u002F\u002F Capture locally before await\n\n        error = null;\n        isLoading = true;\n\n        try\n        {\n            var result = await ProductService.GetByCategoryAsync(CategoryId, cancellationToken);\n            products = result;\n        }\n        catch (OperationCanceledException ex) when (!cancellationToken.IsCancellationRequested)\n        {\n            Logger.LogWarning(ex, \"Timed out loading category {CategoryId}\", CategoryId);\n            error = \"The request timed out. Please try again.\";\n        }\n        finally\n        {\n            isLoading = false;\n        }\n    }\n\n    public async ValueTask DisposeAsync()\n    {\n        if (cts is not null)\n        {\n            await cts.CancelAsync();\n            cts.Dispose();\n        }\n    }\n}\n```\n\nKey details:\n- **Guard with tracked value**: `loadedCategoryId` skips reloads when only UI parameters change.\n- **Capture the token locally** before the await — the CTS field may be replaced by a concurrent parameter change.\n- **Don't null out `products`** on subsequent loads — keep existing data visible with an `isLoading` overlay.\n- **`IAsyncDisposable`** cancels pending work when the user navigates away.\n\n## Step 6 — Send Data\n\n```csharp\nvar response = await http.PostAsJsonAsync(\"products\", newProduct);\nresponse.EnsureSuccessStatusCode();\n\nvar response = await http.PutAsJsonAsync($\"products\u002F{id}\", updated);\nresponse.EnsureSuccessStatusCode();\n\nvar response = await http.DeleteAsync($\"products\u002F{id}\");\nresponse.EnsureSuccessStatusCode();\n```\n\nDisable the submit button while saving to prevent duplicate requests. Show a saving indicator.\n\n## Step 7 — Service Abstraction for Auto or WebAssembly with Prerendering\n\nWhen components run in both server and browser (Auto mode, or WebAssembly with prerendering), abstract data access behind an abstract base class:\n\n```csharp\npublic abstract class ProductServiceBase\n{\n    public abstract Task\u003CProduct[]> GetAllAsync(CancellationToken ct = default);\n}\n\n\u002F\u002F Server — direct database access\npublic class ServerProductService(AppDbContext db) : ProductServiceBase\n{\n    public override async Task\u003CProduct[]> GetAllAsync(CancellationToken ct = default) =>\n        await db.Products.ToArrayAsync(ct);\n}\n\n\u002F\u002F Client — calls API\npublic class ClientProductService(HttpClient http) : ProductServiceBase\n{\n    public override async Task\u003CProduct[]> GetAllAsync(CancellationToken ct = default) =>\n        await http.GetFromJsonAsync\u003CProduct[]>(\"api\u002Fproducts\", ct) ?? [];\n}\n```\n\nRegister the appropriate implementation in each project's `Program.cs`. Components inject the abstract base class.\n\n## Don'ts\n\n- **Don't call APIs in constructors** — use `OnInitializedAsync`.\n- **Don't use `OnParametersSetAsync` unless data depends on a changing parameter.** Use `OnInitializedAsync` for initial loads.\n- **Don't inject `DbContext` in WebAssembly\u002FAuto components** — no database in the browser.\n- **Don't call your own server via `HttpClient`** — inject the service directly.\n- **Don't display `exception.Message` to users** — PII risk. Log it, show a generic message.\n- **Don't catch `OperationCanceledException` for self-cancellation** — `ComponentBase` handles it.\n","# Fetch and Send Data\n\n## Step 1 — Read AGENTS.md\n\nCheck **Interactivity Mode** and **Scope**:\n\n| Mode | Data access |\n|------|-------------|\n| None (Static SSR) | Server-side: inject services\u002F`DbContext`. Use `[StreamRendering]` for loading UX. |\n| Server | Server-side: inject services\u002F`DbContext`. Guard prerender with `??=` + `[PersistentState]`. |\n| WebAssembly | Browser-side: `HttpClient` only. No direct server access. |\n| Auto | Both server and browser. Always go through an API. |\n\n## Step 2 — Register HttpClient\n\nOnly needed when calling external APIs from Server, or always for WebAssembly\u002FAuto. Server components accessing their own database should inject `DbContext` or a service directly.\n\n```csharp\n\u002F\u002F Named client — requires Microsoft.Extensions.Http NuGet\nbuilder.Services.AddHttpClient(\"CatalogAPI\", client =>\n{\n    client.BaseAddress = new Uri(\"https:\u002F\u002Fapi.example.com\u002F\");\n});\n\n\u002F\u002F Typed client\nbuilder.Services.AddHttpClient\u003CCatalogClient>(client =>\n    client.BaseAddress = new Uri(\"https:\u002F\u002Fapi.example.com\u002F\"));\n```\n\nFor WebAssembly\u002FAuto with prerendering, register in **both** server and `.Client` `Program.cs`.\n\n## Step 3 — Fetch Data\n\n### Simple load\n\n```razor\n@page \"\u002Fproducts\"\n@inject CatalogClient Catalog\n\n@if (products is null)\n{\n    \u003Cp>Loading…\u003C\u002Fp>\n}\nelse\n{\n    @foreach (var p in products)\n    {\n        \u003Cp>@p.Name — @p.Price.ToString(\"C\")\u003C\u002Fp>\n    }\n}\n\n@code {\n    private Product[]? products;\n\n    protected override async Task OnInitializedAsync()\n    {\n        products = await Catalog.GetProductsAsync();\n    }\n}\n```\n\nNo error handling needed in the simplest case — wrap the component usage in `\u003CErrorBoundary>` at the parent\u002Flayout level to catch unhandled exceptions.\n\n### Static SSR — StreamRendering\n\nWithout `[StreamRendering]`, the user sees nothing until `OnInitializedAsync` completes:\n\n```razor\n@attribute [StreamRendering]\n```\n\nOnly affects Static SSR. No effect on interactive components.\n\n### Prerendering guard\n\nPrerendering calls `OnInitializedAsync` twice. Skip the duplicate:\n\n```csharp\n[PersistentState] private Product[]? products;\n\nprotected override async Task OnInitializedAsync()\n{\n    products ??= await Catalog.GetProductsAsync();\n}\n```\n\nSee the `support-prerendering` skill for details.\n\n## Step 4 — Handle Errors\n\nUse `\u003CErrorBoundary>` as the default error strategy. It provides a consistent error experience across all components without any per-component catch logic. Wrap component usage at the layout or parent level:\n\n```razor\n\u003CErrorBoundary>\n    \u003CChildContent>\n        \u003CProductList \u002F>\n    \u003C\u002FChildContent>\n    \u003CErrorContent>\n        \u003Cdiv class=\"alert alert-danger\">Something went wrong. Please refresh.\u003C\u002Fdiv>\n    \u003C\u002FErrorContent>\n\u003C\u002FErrorBoundary>\n```\n\nNon-cancellation exceptions (`HttpRequestException`, etc.) propagate to `ErrorBoundary` automatically — no catch blocks needed in the component.\n\n### Cancellation is special\n\n`ComponentBase` silently swallows **all** `OperationCanceledException` — both self-initiated (disposal, parameter change) and external (HttpClient timeout). `ErrorBoundary` never sees them. This means:\n\n- Self-cancellation → silently ignored. Correct behavior, no action needed.\n- External cancellation (timeout) → also silently swallowed. Component gets stuck in loading state. Usually acceptable — timeouts are rare.\n\n### When to add in-component error handling\n\nOnly add catch blocks when the component needs behavior `ErrorBoundary` can't provide — typically **retries** or **timeout-specific messages**. Even then, only catch what you need:\n\n```csharp\n\u002F\u002F Catch only external cancellation (timeouts) — everything else flows to ErrorBoundary\ncatch (OperationCanceledException ex) when (!cancellationToken.IsCancellationRequested)\n{\n    Logger.LogWarning(ex, \"Request timed out for category {CategoryId}\", CategoryId);\n    error = \"The request timed out. Please try again.\";\n}\n```\n\nIf the component also needs to handle general errors with a retry button instead of letting `ErrorBoundary` take over:\n\n```csharp\ncatch (OperationCanceledException ex) when (!cancellationToken.IsCancellationRequested)\n{\n    Logger.LogWarning(ex, \"Request timed out for category {CategoryId}\", CategoryId);\n    error = \"The request timed out. Please try again.\";\n}\ncatch (Exception ex)\n{\n    Logger.LogError(ex, \"Failed to load products for category {CategoryId}\", CategoryId);\n    error = \"Unable to load products. Please try again.\";\n}\n```\n\n### Rules\n\n- **Never display `exception.Message`** — it may contain PII, connection strings, or internal details. Use hardcoded user-friendly messages.\n- **Always log through `ILogger`** — the real exception goes to the logging pipeline.\n- **Services must accept `CancellationToken`** — pass it to every async call so work stops when the component cancels.\n\n## Step 5 — Parameter-Driven Reloading\n\nWhen data depends on a route or query parameter that changes (e.g., navigating between `\u002Fproducts\u002F1` and `\u002Fproducts\u002F2`), use `OnParametersSetAsync` with a guard to skip reloads for parameters that don't affect data.\n\n### Pattern: cancel-and-reload with stale data overlay\n\n```razor\n@page \"\u002Fproducts\u002F{CategoryId:int}\"\n@implements IAsyncDisposable\n@inject ProductService ProductService\n@inject ILogger\u003CProducts> Logger\n\n@if (error is not null)\n{\n    \u003Cdiv class=\"alert alert-danger\">\n        \u003Cp>@error\u003C\u002Fp>\n        \u003Cbutton @onclick=\"LoadAsync\">Retry\u003C\u002Fbutton>\n    \u003C\u002Fdiv>\n}\nelse if (products is null)\n{\n    \u003Cp>Loading…\u003C\u002Fp>\n}\nelse\n{\n    @if (isLoading)\n    {\n        \u003Cp>\u003Cem>Refreshing…\u003C\u002Fem>\u003C\u002Fp>\n    }\n    @foreach (var p in products)\n    {\n        \u003Cp>@p.Name — @p.Price.ToString(\"C\")\u003C\u002Fp>\n    }\n}\n\n@code {\n    [Parameter] public int CategoryId { get; set; }\n    [SupplyParameterFromQuery] public string? ViewMode { get; set; } \u002F\u002F UI-only\n\n    private CancellationTokenSource? cts;\n    private int? loadedCategoryId;\n    private List\u003CProduct>? products;\n    private bool isLoading;\n    private string? error;\n\n    protected override async Task OnParametersSetAsync()\n    {\n        if (CategoryId == loadedCategoryId)\n        {\n            return; \u002F\u002F Only ViewMode changed — no reload\n        }\n\n        loadedCategoryId = CategoryId;\n        await LoadAsync();\n    }\n\n    private async Task LoadAsync()\n    {\n        if (cts is not null)\n        {\n            await cts.CancelAsync();\n            cts.Dispose();\n        }\n\n        cts = new CancellationTokenSource();\n        var cancellationToken = cts.Token; \u002F\u002F Capture locally before await\n\n        error = null;\n        isLoading = true;\n\n        try\n        {\n            var result = await ProductService.GetByCategoryAsync(CategoryId, cancellationToken);\n            products = result;\n        }\n        catch (OperationCanceledException ex) when (!cancellationToken.IsCancellationRequested)\n        {\n            Logger.LogWarning(ex, \"Timed out loading category {CategoryId}\", CategoryId);\n            error = \"The request timed out. Please try again.\";\n        }\n        finally\n        {\n            isLoading = false;\n        }\n    }\n\n    public async ValueTask DisposeAsync()\n    {\n        if (cts is not null)\n        {\n            await cts.CancelAsync();\n            cts.Dispose();\n        }\n    }\n}\n```\n\nKey details:\n- **Guard with tracked value**: `loadedCategoryId` skips reloads when only UI parameters change.\n- **Capture the token locally** before the await — the CTS field may be replaced by a concurrent parameter change.\n- **Don't null out `products`** on subsequent loads — keep existing data visible with an `isLoading` overlay.\n- **`IAsyncDisposable`** cancels pending work when the user navigates away.\n\n## Step 6 — Send Data\n\n```csharp\nvar response = await http.PostAsJsonAsync(\"products\", newProduct);\nresponse.EnsureSuccessStatusCode();\n\nvar response = await http.PutAsJsonAsync($\"products\u002F{id}\", updated);\nresponse.EnsureSuccessStatusCode();\n\nvar response = await http.DeleteAsync($\"products\u002F{id}\");\nresponse.EnsureSuccessStatusCode();\n```\n\nDisable the submit button while saving to prevent duplicate requests. Show a saving indicator.\n\n## Step 7 — Service Abstraction for Auto or WebAssembly with Prerendering\n\nWhen components run in both server and browser (Auto mode, or WebAssembly with prerendering), abstract data access behind an abstract base class:\n\n```csharp\npublic abstract class ProductServiceBase\n{\n    public abstract Task\u003CProduct[]> GetAllAsync(CancellationToken ct = default);\n}\n\n\u002F\u002F Server — direct database access\npublic class ServerProductService(AppDbContext db) : ProductServiceBase\n{\n    public override async Task\u003CProduct[]> GetAllAsync(CancellationToken ct = default) =>\n        await db.Products.ToArrayAsync(ct);\n}\n\n\u002F\u002F Client — calls API\npublic class ClientProductService(HttpClient http) : ProductServiceBase\n{\n    public override async Task\u003CProduct[]> GetAllAsync(CancellationToken ct = default) =>\n        await http.GetFromJsonAsync\u003CProduct[]>(\"api\u002Fproducts\", ct) ?? [];\n}\n```\n\nRegister the appropriate implementation in each project's `Program.cs`. Components inject the abstract base class.\n\n## Don'ts\n\n- **Don't call APIs in constructors** — use `OnInitializedAsync`.\n- **Don't use `OnParametersSetAsync` unless data depends on a changing parameter.** Use `OnInitializedAsync` for initial loads.\n- **Don't inject `DbContext` in WebAssembly\u002FAuto components** — no database in the browser.\n- **Don't call your own server via `HttpClient`** — inject the service directly.\n- **Don't display `exception.Message` to users** — PII risk. Log it, show a generic message.\n- **Don't catch `OperationCanceledException` for self-cancellation** — `ComponentBase` handles it.\n",{"name":5,"license":15,"description":7},"main","497cc9aba79a931ac6fb8d36a48cc22fe3d6d74b","catalog\u002FFrameworks\u002FOfficial-DotNet-Blazor\u002Fskills\u002Ffetch-and-send-data",41,"https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills","https:\u002F\u002Fskills.managed-code.com","https:\u002F\u002Fgithub.com\u002Fmanagedcode","https:\u002F\u002Fwww.managed-code.com","Open Source Community for .NET Developers: Reliable, Actively Maintained, and Community-Driven. Made in Ukraine 🇺🇦 with ❤️","2026-11-14 19:05:44",{"source":8,"skillName":5,"commands":73,"prompt":83,"zipAvailable":84},[74,77,80],{"tool":75,"command":76},"npx","npx skills add managedcode\u002Fdotnet-skills --skill fetch-and-send-data",{"tool":78,"command":79},"bunx","bunx skills add managedcode\u002Fdotnet-skills --skill fetch-and-send-data",{"tool":81,"command":82},"pnpm","pnpm dlx skills add managedcode\u002Fdotnet-skills --skill fetch-and-send-data","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FFrameworks\u002FOfficial-DotNet-Blazor\u002Fskills\u002Ffetch-and-send-data\u002FSKILL.md",true,[86],{"path":87,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":90,"sourceHtmlUrl":91},"manifest.json","REFERENCE","参考文档",162,"https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FFrameworks\u002FOfficial-DotNet-Blazor\u002Fskills\u002Ffetch-and-send-data\u002Fmanifest.json",[93,123,145,176,186,213],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":103,"publishedAt":57},"01M6DYQE1Y9FHAQHEDTVFQ3447","xtwitter-scraper","Use XTwitterScraper when a .NET application needs typed access to Xquik's X automation REST API for tweet search, user lookup, posting workflows, extraction jobs, monitors, webhooks, or giveaway draws. USE FOR: integrating the XTwitterScraper NuGet package; reviewing Xquik API client usage; modeling API-key configuration, pagination, binary exports, raw responses, retries, and webhook\u002Fevent flows in .NET. DO NOT USE FOR: unrelated stacks; direct browser automation; generic social-media strategy; or code that does not call Xquik. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FLibraries\u002FXTwitterScraper\u002Fskills\u002Fxtwitter-scraper\u002FSKILL.md",[99,100],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":101,"categoryName":102,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000030","开发工程师",[104,105,106,107,108,109,110,111,49,112,113,114,115,116,117,118,119,120,121,122],"xtwitter scraper","browser automation","workflows","run","code","browser","search","repository","Media","api client","access","edit","unrelated","webhooks","files","social","commands","modeling","webhook",{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":135,"publishedAt":57},"01M6DYQ9S4PE1H6G8MCH9T21HR","sep","Use Sep for high-performance separated-value parsing and writing in .NET, including delimiter inference, explicit parser\u002Fwriter options, and low-allocation row\u002Fcolumn workflows. USE FOR: delimited data needs are performance-sensitive and allocation-aware; project needs explicit control over separator inference, escaping, trimming, and header behavior;. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FLibraries\u002FSep\u002Fskills\u002Fsep\u002FSKILL.md",[129,132],{"categoryNo":130,"categoryName":131,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":133,"categoryName":134,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000036","内容创作者",[125,136,137,106,138,107,111,30,139,140,115,141,116,118,44,142,143,41,120,144],"writing","performance","tasks","parsing","parser","context","writer","options","high-performance",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":57},"01M6DZS2DNEPXCGGF6SSCW6G5V","webgpu-threejs-tsl","Comprehensive guide for developing WebGPU-enabled Three.js applications using TSL (Three.js Shading Language). Covers WebGPU renderer setup, TSL syntax and node materials, compute shaders, post-processing effects, and WGSL integration. Use this skill when working with Three.js WebGPU, TSL shaders, node materials, or GPU compute in Three.js.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fwebgpu-claude-skill\u002Fskills\u002Fwebgpu-threejs-tsl\u002FSKILL.md",[],[152,153,154,155,156,157,158,159,160,161,162,163,48,164,165,166,167,168,169,170,171,172,173,174,175],"webgpu","threejs","webgpu threejs tsl","setup","shaders","gpu","integration","applications","js","node","syntax","guide","language","three","compute","post","processing","with","renderer","for","materials","wgsl","effects","when",{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":182,"publishedAt":57},"01M6DZS0BQXW2B56A289XF1X76","roslynk","Use Roslynk for semantic inspection and edits of *.cs, *.razor and *.cshtml solution files.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Froslynk\u002Fskills\u002Froslynk\u002FSKILL.md",[],[178,48,118,183,184,171,185],"semantic","razor","inspection",{"skillNo":187,"name":188,"nameZh":6,"description":189,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":190,"categories":191,"keywords":192,"publishedAt":57},"01M6DZRW6MEJCVW80K3S4XV60K","system-text-json-net11","Imperative guidance for the System.Text.Json APIs added in .NET 11: the built-in `JsonNamingPolicy.PascalCase` naming policy, and the strongly-typed generic `JsonSerializerOptions.GetTypeInfo` and `JsonSerializerOptions.TryGetTypeInfo` metadata accessors (generic overloads that return a typed `JsonTypeInfo`). USE ONLY when the user is targeting net11.0 or later and needs PascalCase JSON property or dictionary-key names without writing a custom naming policy, a strongly-typed generic `JsonTypeInfo` instead of the non-generic `JsonTypeInfo`, or a no-throw way to probe whether a type's serialization metadata is resolved. DO NOT USE when the target is earlier than net11.0, the requested behavior uses an established pre-net11 naming policy, or the user explicitly selected another JSON library.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fdotnet-skills\u002Fplugins\u002Fdotnet11\u002Fskills\u002Fsystem-text-json-net11\u002FSKILL.md",[],[193,194,195,196,136,197,198,199,200,201,202,48,203,204,205,206,44,207,208,209,210,171,211,212,175],"system","json","text","system text json net11","policy","metadata","library","serialization","behavior","user","only","probe","guidance","later","type","dictionary","naming","targeting","custom","generic",{"skillNo":214,"name":215,"nameZh":6,"description":216,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":217,"categories":218,"keywords":221,"publishedAt":57},"01M6DZRRJP3S662NFSG1RSPQQ7","process-api-net11","Provides guidance on the new System.Diagnostics.Process APIs introduced in .NET 11: Process.Run, Process.RunAndCaptureText, Process.StartAndForget, Process.ReadAllText\u002FBytes\u002FLines, KillOnParentExit, InheritedHandles, and StartDetached. USE FOR: starting, orchestrating, or capturing output from external processes in applications targeting net11.0 or later. DO NOT USE FOR: applications targeting .NET 10 or earlier, or basic pre-.NET 11 Process.Start usage without new APIs.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fdotnet-skills\u002Fplugins\u002Fdotnet11\u002Fskills\u002Fprocess-api-net11\u002FSKILL.md",[219,220],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":101,"categoryName":102,"taxonomyType":26,"taxonomyTypeDesc":27},[49,222,223,224,107,225,159,193,48,205,206,44,226,227,228,229,210,171,230],"process","process api net11","diagnostics","start","basic","processes","output","usage","new"]