---
id: change/bcapps/12694
type: change
title: "#12694 Allow API tests to issue local HTTP requests"
summary: API tests can now issue local HTTP requests by declaring explicit test HTTP request policies, and OCR authentication header handling was corrected to avoid validation errors.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit http web request mgt.
  - codeunit ocr service mgt.
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-10-16T01:17:10.624Z"
  flags: []
generated:
  at: "2026-10-28T08:47:18.430Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 3d2e8340d1fcafb7e0ba4047c1a2b66309d275f3
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/12694
    title: "microsoft/BCApps#12694: Allow API tests to issue local HTTP requests"
    date: "2026-10-14"
    commit: 3d2e8340d1fcafb7e0ba4047c1a2b66309d275f3
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/1297
    - object/codeunit/1294
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-httpclient-mock-outbound-calls
      title: Mock outbound HttpClient web service calls during testing
      label: possibly related
      why: Explains mocking HttpClient calls during testing, directly relevant to allowing local HTTP requests in API tests
      by: model
    - to: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-outgoing-trace
      title: Outgoing Web Service Request Trace
      label: possibly related
      why: Documents outgoing web service request telemetry, applicable to HTTP request handling in test scenarios
      by: model
number: 12694
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/12694
kind: pr
base_branch: main
major: "30"
merged_at: "2026-10-14T06:26:23Z"
author: onbuyuka
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: Integrations"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 167
  additions: 375
  deletions: 582
  al: 3
apps:
  - Base Application
objects_touched:
  - key: codeunit/1297
    page: codeunit/1297
    type: codeunit
    id: 1297
    name: Http Web Request Mgt.
    app: Base Application
    status: modified
  - key: codeunit/1294
    page: codeunit/1294
    type: codeunit
    id: 1294
    name: OCR Service Mgt.
    app: Base Application
    status: modified
objects_unjoined:
  - path: src/Layers/APAC/BaseApp/eServices/EDocument/OCRServiceMgt.Codeunit.al
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 653825
systems:
  - integration
quote: null
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #12694 Allow API tests to issue local HTTP requests

> API tests can now issue local HTTP requests by declaring explicit test HTTP request policies, and OCR authentication header handling was corrected to avoid validation errors.

[Pull request](https://github.com/microsoft/BCApps/pull/12694) · merged into `main` (BC30) on 2026-10-14 by onbuyuka · 167 files (+375 -582), 3 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Adds AllowAllOutboundRequests policy annotation to 153 API test codeunits
- Fixes OCR service authentication by using TryAddWithoutValidation for x-rs-key header
- Resolves test failures caused by default BlockOutboundRequests policy
- Preserves legacy HTTP request manager wire behavior for OCR mock service
- No public API or schema changes
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 1297 "Http Web Request Mgt."](../../objects/codeunit/1297.md), Base Application: modified
- [Codeunit 1294 "OCR Service Mgt."](../../objects/codeunit/1294.md), Base Application: modified
- `src/Layers/APAC/BaseApp/eServices/EDocument/OCRServiceMgt.Codeunit.al`: modified, not in the BC30 snapshot

## Context

- Work items: AB#653825
- Labels: AL: Apps (W1), Team: Integrations
- Systems: integration

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Mock outbound HttpClient web service calls during testing](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-httpclient-mock-outbound-calls) — possibly related: Explains mocking HttpClient calls during testing, directly relevant to allowing local HTTP requests in API tests (model-linked)
- [Outgoing Web Service Request Trace](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-outgoing-trace) — possibly related: Documents outgoing web service request telemetry, applicable to HTTP request handling in test scenarios (model-linked)

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
