Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CWD
powerdns-client
Commits
e34e62d7
Commit
e34e62d7
authored
Apr 27, 2021
by
Ludwig Ruderstaller
Browse files
Merge branch 'feature-bindexport' into 'develop'
Feature bindexport See merge request
!11
parents
2b8e23da
bd33c2b8
Pipeline
#25957
failed with stage
in 1 minute and 44 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Client.php
View file @
e34e62d7
...
...
@@ -72,7 +72,7 @@ class Client
*
* @return mixed
*/
public
function
call
(
$payload
=
null
,
$uri
,
$hydrationClass
=
null
,
$isList
=
false
,
$method
=
'GET'
,
array
$queryParams
=
[])
public
function
call
(
$payload
=
null
,
$uri
,
$hydrationClass
=
null
,
$isList
=
false
,
$method
=
'GET'
,
array
$queryParams
=
[]
,
$isJson
=
true
)
{
$uri
=
rtrim
(
sprintf
(
'%s/%s'
,
$this
->
apiUri
,
$uri
),
'/'
);
...
...
@@ -86,10 +86,15 @@ class Client
],
$payload
);
$response
=
$this
->
client
->
sendRequest
(
$request
);
$responseBody
=
$response
->
getBody
()
->
getContents
();
if
(
!
$isJson
)
{
return
$responseBody
;
}
$responseData
=
json_decode
(
$responseBody
);
if
(
$response
->
getStatusCode
()
>=
300
&&
isset
(
$responseData
->
error
))
{
throw
new
\
LogicException
(
sprintf
(
'Error on %s request %s: %s'
,
$method
,
$uri
,
$responseData
->
error
));
}
...
...
Endpoints/ZonesEndpoint.php
View file @
e34e62d7
...
...
@@ -187,7 +187,7 @@ class ZonesEndpoint extends AbstractEndpoint
$zoneId
=
$zoneId
->
getId
();
}
return
$this
->
getClient
()
->
call
(
null
,
sprintf
(
self
::
ENDPOINT_ELEMENT
,
$this
->
defaultServerId
,
$zoneId
)
.
'/export'
,
null
,
false
,
'GET'
);
return
$this
->
getClient
()
->
call
(
null
,
sprintf
(
self
::
ENDPOINT_ELEMENT
,
$this
->
defaultServerId
,
$zoneId
)
.
'/export'
,
null
,
false
,
'GET'
,
[],
false
);
}
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment