Skip to content

0.17.1 preview 1#170

Draft
WeihanLi wants to merge 64 commits into
previewfrom
dev
Draft

0.17.1 preview 1#170
WeihanLi wants to merge 64 commits into
previewfrom
dev

Conversation

@WeihanLi
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI and others added 30 commits March 28, 2026 01:01
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…g-document

fix: add missing load-testing.md and markdown link check workflow
Add zh-CN translations for all 15 documentation files in docs/articles/:
- README.zh.md
- installation.zh.md
- quick-start.zh.md
- basic-usage.zh.md
- http-requests.zh.md
- request-data-types.zh.md
- authentication.zh.md
- file-execution.zh.md
- api-test-collections.zh.md
- load-testing.zh.md
- docker-usage.zh.md
- ci-cd-integration.zh.md
- debugging.zh.md
- examples/common-use-cases.zh.md
- reference/command-line-options.zh.md

Translation conventions:
- Code blocks, commands, file names, technical terms, URLs remain in English
- Section headings translated to natural Simplified Chinese
- Added '> 📖 [查看中文文档](filename.zh.md)' note at top of each English file
- Added '([中文](README.zh.md))' suffix to docs/articles/README.md heading
- Added 🇨🇳 Chinese docs row to Documentation table in root README.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: WeihanLi <7604648+WeihanLi@users.noreply.github.com>
…se-document

docs: add Simplified Chinese translations for all documentation articles
testing dotnet-install musl binary
WeihanLi and others added 21 commits April 19, 2026 20:30
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…eature

feat: implement multipart/form-data file upload via --multipart flag
Copilot AI review requested due to automatic review settings May 21, 2026 12:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates dotnet-httpie for the 0.17.1 preview line by adding first-class multipart/form-data support (including file uploads) and introducing a DocFX documentation site with extensive Simplified Chinese documentation and link-checking workflows.

Changes:

  • Add --multipart flag support, multipart request modeling, and multipart request mapping (including file uploads).
  • Add unit tests covering multipart parsing/mapping behavior.
  • Add DocFX documentation site scaffolding + Chinese documentation set, update READMEs, and add CI workflows for docs and markdown link checking; bump package versions and patch version.

Reviewed changes

Copilot reviewed 52 out of 53 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/HTTPie.UnitTest/Middleware/MultipartUploadMiddlewareTest.cs Adds unit tests for multipart parsing behavior in RequestDataMiddleware.
tests/HTTPie.UnitTest/Implement/RequestMapperTest.cs Adds unit tests verifying multipart HttpRequestMessage construction.
src/HTTPie/Utilities/Constants.cs Introduces IsMultipartContentType flag constant.
src/HTTPie/Models/MultipartRequestPart.cs Adds multipart part model records (text/file).
src/HTTPie/Models/HttpRequestModel.cs Extends request model with multipart parts collections.
src/HTTPie/Middleware/RequestDataMiddleware.cs Adds --multipart option and parsing logic for multipart text/file items.
src/HTTPie/Implement/RequestMapper.cs Maps multipart request models to MultipartFormDataContent, including file streams and MIME types.
README.zh.md Adds a full Simplified Chinese README.
README.md Links to Chinese documentation and adds a docs index entry.
docs/toc.yml Adds DocFX top-level TOC for the documentation site.
docs/ReleaseNotes.zh.md Adds Simplified Chinese release notes page.
docs/ReleaseNotes.md Links to the Chinese release notes page.
docs/index.md Adds DocFX landing page.
docs/docfx.json Adds DocFX build configuration.
docs/articles/toc.yml Adds DocFX articles TOC structure.
docs/articles/request-data-types.zh.md Adds Simplified Chinese “Request Data Types” article (includes multipart docs).
docs/articles/request-data-types.md Links to Chinese version and trims outdated references.
docs/articles/reference/toc.yml Adds reference-section TOC.
docs/articles/reference/command-line-options.zh.md Adds Simplified Chinese CLI options reference.
docs/articles/reference/command-line-options.md Links to Chinese version.
docs/articles/README.zh.md Adds Simplified Chinese docs index.
docs/articles/README.md Adds Chinese cross-link and simplifies docs index links.
docs/articles/quick-start.zh.md Adds Simplified Chinese quick start.
docs/articles/quick-start.md Links to Chinese version.
docs/articles/load-testing.zh.md Adds Simplified Chinese load testing doc.
docs/articles/load-testing.md Adds English load testing doc (with Chinese cross-link).
docs/articles/installation.zh.md Adds Simplified Chinese installation guide.
docs/articles/installation.md Links to Chinese version.
docs/articles/http-requests.zh.md Adds Simplified Chinese HTTP requests guide.
docs/articles/http-requests.md Links to Chinese version and trims outdated references.
docs/articles/file-execution.zh.md Adds Simplified Chinese file execution guide.
docs/articles/file-execution.md Links to Chinese version and removes sections no longer documented.
docs/articles/examples/toc.yml Adds examples-section TOC.
docs/articles/examples/common-use-cases.zh.md Adds Simplified Chinese common use cases guide.
docs/articles/examples/common-use-cases.md Links to Chinese version and trims outdated references.
docs/articles/docker-usage.zh.md Adds Simplified Chinese Docker usage guide.
docs/articles/docker-usage.md Links to Chinese version and trims outdated references.
docs/articles/debugging.zh.md Adds Simplified Chinese debugging guide.
docs/articles/debugging.md Links to Chinese version and trims outdated references.
docs/articles/ci-cd-integration.zh.md Adds Simplified Chinese CI/CD integration guide.
docs/articles/ci-cd-integration.md Links to Chinese version and fixes relative links in “Next steps”.
docs/articles/basic-usage.zh.md Adds Simplified Chinese basic usage guide.
docs/articles/basic-usage.md Links to Chinese version.
docs/articles/authentication.zh.md Adds Simplified Chinese authentication guide.
docs/articles/authentication.md Links to Chinese version and trims outdated references.
docs/articles/api-test-collections.zh.md Adds Simplified Chinese API test collections guide.
docs/articles/api-test-collections.md Links to Chinese version.
Directory.Packages.props Updates central package versions (e.g., System.CommandLine, JsonSchema.Net, coverlet, etc.).
build/version.props Bumps patch version to 0.17.1.
build.sh Adjusts dnx invocation argument order.
.gitignore Ignores generated DocFX output (docs/_site/).
.github/workflows/markdown-links.yml Adds a GitHub Actions workflow to validate markdown links.
.github/workflows/docfx.yml Adds a GitHub Actions workflow to build (and on non-PR events, deploy) DocFX docs.

Comment on lines +54 to +63
// Parse file upload items: fieldName@/path/to/file
requestModel.FileUploads = requestModel.RequestItems
.Select(ParseMultipartFileUpload)
.OfType<FileUploadPart>()
.ToList();

requestModel.MultipartTextParts = requestModel.RequestItems
.Select(ParseMultipartTextPart)
.OfType<MultipartTextPart>()
.ToList();
Comment on lines +14 to 16
public async Task<HttpRequestMessage> ToRequestMessage(HttpContext httpContext)
{
var requestModel = httpContext.Request;
Comment on lines +28 to +54
var isMultipart = httpContext.GetFlag(Constants.FlagNames.IsMultipartContentType);
if (isMultipart)
{
var multipartContent = new MultipartFormDataContent();

foreach (var multipartTextPart in requestModel.MultipartTextParts)
{
multipartContent.Add(new StringContent(multipartTextPart.Value), multipartTextPart.FieldName);
}

// Add file parts
foreach (var fileUpload in requestModel.FileUploads)
{
var fileContent = CreateMultipartFileContent(fileUpload);
try
{
multipartContent.Add(fileContent, fileUpload.FieldName, Path.GetFileName(fileUpload.FilePath));
}
catch
{
fileContent.Dispose();
throw;
}
}

request.Content = multipartContent;
}
Comment on lines +4 to +8
namespace HTTPie.Models;

public sealed record MultipartTextPart(string FieldName, string Value);

public sealed record FileUploadPart(string FieldName, string FilePath);
@WeihanLi WeihanLi marked this pull request as draft May 28, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants