Skip to content

fix(httpx_header): allow httpx determine the correct header#563

Merged
giuliastf merged 1 commit intomainfrom
fix/httpx_header
Sep 15, 2025
Merged

fix(httpx_header): allow httpx determine the correct header#563
giuliastf merged 1 commit intomainfrom
fix/httpx_header

Conversation

@giuliastf
Copy link
Copy Markdown
Collaborator

@giuliastf giuliastf commented Sep 10, 2025

Fix: #508

Development Package

  • Add this package as a dependency in your pyproject.toml:
[project]
dependencies = [
  # Exact version:
  "uipath==2.1.48.dev1005631078",

  # Any version from PR
  "uipath>=2.1.48.dev1005630000,<2.1.48.dev1005640000"
]

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

[tool.uv.sources]
uipath = { index = "testpypi" }

@giuliastf giuliastf requested a review from Copilot September 10, 2025 13:26
@giuliastf giuliastf self-assigned this Sep 10, 2025
Copy link
Copy Markdown

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 fixes an httpx header issue by allowing httpx to determine the correct content-type header automatically instead of manually setting it. The change replaces manual string content serialization with proper JSON serialization using the json parameter.

  • Removes hardcoded "Content-Type": "application/json" from default headers
  • Converts manual string content creation to proper JSON serialization using json parameter
  • Updates test assertions to use json.dumps() with consistent separators for comparison
  • Adds proper params and json parameter handling to request calls

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/uipath/_services/_base_service.py Removes hardcoded Content-Type header and adds RequestSpec handling methods
src/uipath/_services/processes_service.py Converts manual content string to json parameter and adds proper request parameters
src/uipath/_services/assets_service.py Converts content strings to json parameters and adds proper request handling
src/uipath/_services/actions_service.py Removes manual JSON serialization in favor of json parameter and updates request calls
tests/sdk/services/test_base_service.py Updates test expectations to remove Content-Type header assertion
tests/sdk/services/test_processes_service.py Updates test assertions to use json.dumps() for consistent JSON comparison

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/uipath/_services/assets_service.py
@giuliastf giuliastf force-pushed the fix/httpx_header branch 4 times, most recently from 8f84459 to 55d65a6 Compare September 10, 2025 14:43
@giuliastf giuliastf added the build:dev Create a dev build from the pr label Sep 11, 2025
@giuliastf giuliastf force-pushed the fix/httpx_header branch 2 times, most recently from 17d36d7 to 12e9afc Compare September 12, 2025 12:17
@giuliastf giuliastf added build:dev Create a dev build from the pr and removed build:dev Create a dev build from the pr labels Sep 12, 2025
@giuliastf giuliastf merged commit 8f66f9f into main Sep 15, 2025
17 checks passed
@cristipufu cristipufu deleted the fix/httpx_header branch November 1, 2025 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build:dev Create a dev build from the pr

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let httpx automatically set the Content-Type header

3 participants