Changed from form data to JSON when posting since NetBox expects JSON

This commit is contained in:
Kristoffer Bylund 2021-08-19 12:54:08 +02:00
commit 0e4b722b85

View file

@ -63,7 +63,7 @@ class HttpClient implements HttpClientInterface
'POST',
config('netbox.sites.default.url').$path,
[
'form_params' => $body
'json' => $body
]
);
return json_decode((string)$response->getBody(), true);
@ -80,7 +80,7 @@ class HttpClient implements HttpClientInterface
'PUT',
config('netbox.sites.default.url').$path,
[
'form_params' => $body
'json' => $body
]
);
return json_decode((string)$response->getBody(), true);
@ -97,7 +97,7 @@ class HttpClient implements HttpClientInterface
'DELETE',
config('netbox.sites.default.url').$path,
[
'form_params' => $body
'json' => $body
]
);
return json_decode((string)$response->getBody(), true);