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
Authenticate with a username and password and get the details of a node:
38
39
39
40
```js
40
-
constCSREST=require('@chriscdn/cs-rest')
41
+
constCSREST=require('@kweli/cs-rest')
41
42
42
43
// session wraps an axios instance
43
44
constsession=newCSREST.Session({
@@ -63,11 +64,11 @@ const session = new CSREST.Session({
63
64
64
65
Requests can be made with the `get`, `post`, `put`, `patch`, `delete`, and `options` methods on the `Session` instance. These have the same interface as the respective methods in [axios](https://github.com/axios/axios).
65
66
66
-
Content Server returns a fresh `OTCSTicket` with each successful API call. The `Session` instance will automatically retain it for the subsequent request.
67
+
Content Server returns a fresh `OTCSTicket` with each successful API call. The `Session` instance automatically retains it for the subsequent request.
67
68
68
69
#### POST, PUT, & PATCH
69
70
70
-
The OpenText Content Server REST API doesn't accept requests that use the `application/json` content type. This means post, put, & patch requests need to use a content type of `multipart/form-data`, which makes writing the request a little more verbose. For example, to create a new folder:
71
+
The OpenText Content Server REST API doesn't accept requests that use the `application/json` content type. This means POST, PUT, & PATCH requests need to use a content type of `multipart/form-data`, which makes writing a request a little more verbose. For example, to create a new folder:
71
72
72
73
```js
73
74
constformData=newFormData()
@@ -78,7 +79,7 @@ formDAta.append('name', 'My New Folder')
0 commit comments