9de38c6dc0
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
19 lines
667 B
C#
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;
|
|
}
|
|
}
|