You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to add records to a zone by api call to powerdns with patch method. According to their documentation the api accept and emmits json data. I am using postman for primary testing of the api with raw json body data. In postman it works without any issue with headers for Accept and content type set to application/json and body set to raw JSON.
When I am trying to do the same in laravel with HTTP Client, with withBody it does not work. The powerdns api cannot read the data inside the body. I have tried json_encode inside the withBody as the first param and JSON as the secodn param (the content type) but no solution. I am using Laravel Framework 7.30.4. The code I am using is here,
Can some please tell me what I am doing wrong here? I'm running put of time now. and since the api works with raw body json in Postman it should also work in laravel too.
Please let me know if any more details is required.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am trying to add records to a zone by api call to powerdns with patch method. According to their documentation the api accept and emmits json data. I am using postman for primary testing of the api with raw json body data. In postman it works without any issue with headers for Accept and content type set to application/json and body set to raw JSON.
When I am trying to do the same in laravel with HTTP Client, with withBody it does not work. The powerdns api cannot read the data inside the body. I have tried json_encode inside the withBody as the first param and JSON as the secodn param (the content type) but no solution. I am using Laravel Framework 7.30.4. The code I am using is here,
Can some please tell me what I am doing wrong here? I'm running put of time now. and since the api works with raw body json in Postman it should also work in laravel too.
Please let me know if any more details is required.
adding zone doc of power dns : https://doc.powerdns.com/authoritative/http-api/zone.html
Beta Was this translation helpful? Give feedback.
All reactions