Changed from form data to JSON when posting since NetBox expects JSON
This commit is contained in:
parent
e4889954a8
commit
0e4b722b85
1 changed files with 3 additions and 3 deletions
|
|
@ -63,7 +63,7 @@ class HttpClient implements HttpClientInterface
|
||||||
'POST',
|
'POST',
|
||||||
config('netbox.sites.default.url').$path,
|
config('netbox.sites.default.url').$path,
|
||||||
[
|
[
|
||||||
'form_params' => $body
|
'json' => $body
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
return json_decode((string)$response->getBody(), true);
|
return json_decode((string)$response->getBody(), true);
|
||||||
|
|
@ -80,7 +80,7 @@ class HttpClient implements HttpClientInterface
|
||||||
'PUT',
|
'PUT',
|
||||||
config('netbox.sites.default.url').$path,
|
config('netbox.sites.default.url').$path,
|
||||||
[
|
[
|
||||||
'form_params' => $body
|
'json' => $body
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
return json_decode((string)$response->getBody(), true);
|
return json_decode((string)$response->getBody(), true);
|
||||||
|
|
@ -97,7 +97,7 @@ class HttpClient implements HttpClientInterface
|
||||||
'DELETE',
|
'DELETE',
|
||||||
config('netbox.sites.default.url').$path,
|
config('netbox.sites.default.url').$path,
|
||||||
[
|
[
|
||||||
'form_params' => $body
|
'json' => $body
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
return json_decode((string)$response->getBody(), true);
|
return json_decode((string)$response->getBody(), true);
|
||||||
|
|
|
||||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue