Skip to content

Commit

Permalink
Add ability to make custom requests (#81)
Browse files Browse the repository at this point in the history
* Add ability to make custom requests

When creating records using POST requests, the response is an empty 204. However, the link to the record is stored in the Location header of the response.

This is to allow me to access the headers of the response so I can get the resulting record IDs.

* style fix

* fix style

* Update zeep.py
  • Loading branch information
expressintegrations authored Feb 8, 2024
1 parent d79ad9b commit 9e10ca0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions netsuite/rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ def __init__(
def hostname(self) -> str:
return self._make_hostname()

async def request(self, method: str, subpath: str, **request_kw):
return await self._request_impl(method, subpath, **request_kw)

async def get(self, subpath: str, **request_kw):
return await self._request("GET", subpath, **request_kw)

Expand Down

0 comments on commit 9e10ca0

Please sign in to comment.