Files
Shutong Wu 9de38c6dc0 feat(asset-gen): provider abstraction + HTTP seam + Tripo adapter (Phase 2)
IHttpTransport seam (UnityWebRequestTransport prod, FakeHttpTransport for tests) so
adapters are unit-testable without network. IModelProviderAdapter/IImageProviderAdapter/
IMarketplaceProviderAdapter + DTOs (ModelGenRequest/ImageGenRequest/ProviderPollResult/
ProviderInfo). AssetGenProviders registry (Configured=SecureKeyStore.Has, key-free).
TripoAdapter submit (text/image_to_model, Bearer) + poll with defensive output-url
parsing (pbr_model/model, flat or nested). 8 EditMode tests on FakeHttpTransport.
Compiles clean on Unity 2021.3.45f2.

Claude-Session: https://claude.ai/code/session_01Tjpb5gYgUe2AUJuRdXr7Lv
2026-06-28 19:25:20 -07:00

19 lines
667 B
C#

using System.Collections.Generic;
namespace MCPForUnity.Editor.Services.AssetGen.Http
{
/// <summary>
/// Transport-agnostic description of a single HTTP request. Provider adapters build one
/// of these and hand it to an <see cref="IHttpTransport"/>; this keeps adapters free of
/// any direct dependency on UnityWebRequest so they can be unit-tested without a network.
/// </summary>
public sealed class HttpRequestSpec
{
public string Method;
public string Url;
public Dictionary<string, string> Headers = new Dictionary<string, string>();
public byte[] Body;
public string ContentType;
}
}