Skip to content

Introduced NativeHttpReceiver as a new implementation of `INativeIn… - #132

Merged
AhmadRAbuhussein merged 1 commit into
releases/r8.0from
native-receiver
Mar 25, 2026
Merged

Introduced NativeHttpReceiver as a new implementation of `INativeIn…#132
AhmadRAbuhussein merged 1 commit into
releases/r8.0from
native-receiver

Conversation

@hamzahalq

@hamzahalq hamzahalq commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

…folinkReceiver`

Summary by CodeRabbit

  • New Features
    • Added support for HTTP and REST API data sources with multiple authentication options (API Key, Basic Auth, Bearer tokens, Login, OAuth2)
    • Enabled configuration of HTTP requests with custom headers, request bodies, and response parsing
    • Users can now retrieve and list items from HTTP endpoints with configurable array extraction

@coderabbitai

coderabbitai Bot commented Mar 25, 2026

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

A new HTTP receiver component is introduced for the native adapters system. The implementation adds NativeHttpReceiver class supporting multiple authentication modes (ApiKey, Basic, Bearer, Login, OAuth2) and HTTP operations. Configuration models and dependency injection registration are provided to wire the new receiver into the system.

Changes

Cohort / File(s) Summary
Configuration Models
SW.Bitween.NativeAdapters/HttpReceiver/HttpReceiverInput.cs, SW.Bitween.NativeAdapters/HttpReceiver/HttpReceiverModels.cs
Added HttpReceiverInput with authentication, login, and HTTP request configuration properties; added ReceiverUserLoginModel for login credentials.
Core Implementation
SW.Bitween.NativeAdapters/HttpReceiver/NativeHttpReceiver.cs
Implemented INativeInfolinkReceiver with HTTP client management, support for multiple authentication modes, request building with verb mapping and content-type-aware serialization, response parsing with JSON extraction, and configurable array path handling.
Dependency Injection
SW.Bitween.NativeAdapters/ServiceCollectionExtensions.cs
Registered NativeHttpReceiver as scoped implementation for both INativeInfolinkReceiver and INativeAdapter interfaces.

Sequence Diagram(s)

sequenceDiagram
    actor Client
    participant NativeHttpReceiver
    participant IDynamicHttpProxy
    participant HttpClient
    participant RemoteAPI as Remote HTTP API
    
    Client->>NativeHttpReceiver: ListFiles()
    NativeHttpReceiver->>NativeHttpReceiver: Authenticate (if configured)
    alt Authentication Mode
        NativeHttpReceiver->>IDynamicHttpProxy: Create HttpClient
        IDynamicHttpProxy->>HttpClient: Return configured client
        NativeHttpReceiver->>RemoteAPI: POST /login (if Login mode)
        RemoteAPI-->>NativeHttpReceiver: Token/credentials
        NativeHttpReceiver->>NativeHttpReceiver: Set Authorization header
    end
    
    NativeHttpReceiver->>NativeHttpReceiver: Build HttpRequestMessage
    NativeHttpReceiver->>HttpClient: SendAsync(request)
    HttpClient->>RemoteAPI: HTTP request
    RemoteAPI-->>HttpClient: HTTP response + JSON body
    HttpClient-->>NativeHttpReceiver: Response
    NativeHttpReceiver->>NativeHttpReceiver: Validate status code
    NativeHttpReceiver->>NativeHttpReceiver: Parse JSON response
    NativeHttpReceiver->>NativeHttpReceiver: Extract items (array path or whole response)
    NativeHttpReceiver-->>Client: Item IDs (string collection)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • mmalkhatib

Poem

🐰 Hippity-hops through HTTP streams,
Auth modes dance in config dreams,
JSON parsed with bunny care,
Receiver hops with headers fair! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main objective: introducing NativeHttpReceiver as a new implementation of INativeInfolinkReceiver. It is concise, specific, and directly reflects the primary change across all modified files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch native-receiver

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@AhmadRAbuhussein
AhmadRAbuhussein merged commit eb96bef into releases/r8.0 Mar 25, 2026
3 of 4 checks passed
@MusaMisto
MusaMisto deleted the native-receiver branch July 2, 2026 09:27
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.

2 participants