Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Wpct Http Bridge
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
codeccoop
WordPress
plugins
Wpct Http Bridge
Commits
3ba30c17
Commit
3ba30c17
authored
4 months ago
by
Lucas García
Browse files
Options
Downloads
Patches
Plain Diff
feat: add backend headers schema
parent
c86bea0a
No related branches found
No related tags found
1 merge request
!3
Multi backend plugin
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
includes/class-http-client.php
+1
-1
1 addition, 1 deletion
includes/class-http-client.php
includes/class-settings.php
+13
-2
13 additions, 2 deletions
includes/class-settings.php
with
14 additions
and
3 deletions
includes/class-http-client.php
+
1
−
1
View file @
3ba30c17
...
...
@@ -8,7 +8,7 @@ require_once 'class-multipart.php';
class
Http_Client
{
private
static
const
settings_defaults
=
[
private
const
settings_defaults
=
[
'params'
=>
[],
'data'
=>
[],
'headers'
=>
[
...
...
This diff is collapsed.
Click to expand it.
includes/class-settings.php
+
13
−
2
View file @
3ba30c17
...
...
@@ -21,7 +21,13 @@ class Settings extends BaseSettings
'base_url'
=>
[
'type'
=>
'string'
],
'headers'
=>
[
'type'
=>
'array'
,
'items'
=>
[
'type'
=>
'string'
],
'items'
=>
[
'type'
=>
'object'
,
'properties'
=>
[
'name'
=>
[
'type'
=>
'string'
],
'value'
=>
[
'type'
=>
'string'
],
],
],
],
],
],
...
...
@@ -32,7 +38,12 @@ class Settings extends BaseSettings
[
'name'
=>
'ERP'
,
'base_url'
=>
'https://erp.'
.
$url
[
'host'
],
'headers'
=>
[
'Authorization: Bearer <backend-api-token>'
],
'headers'
=>
[
[
'name'
=>
'Authorization'
,
'value'
=>
'Bearer <backend-api-token>'
]
],
],
],
],
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment