Domino Access Services (DAS) - unable to create a new document

I’m testing the use of Domino Access Services (DAS) on a 9.0.1 server. The test database has been enabled for DAS in the application properties and in the only view in the database. I am using the POST method of the document collection resource to create a new document:. I’m having trouble creating a document - instead of adding a new document, the server is returning a list of existing documents. I’ve given the ‘anonymous’ user manager access to make sure the problem is not in ACL security. I’ve tried creating documents with alternative forms, and I get the same result. There is no form security.

my POST looks like this:

POST /database/api/data/documents?form=formname

Content-Type: application/json

{

“Field1”:“xxx”,

“Field2”:“yyy”

}

but all that comes back is a list of the 3 documents in the database (that I created through the Notes client). Does anyone have any ideas about what I’m doing wrong?

Thanks in advance.

Subject: solved

Seems that if I specify ‘https’ in my URL, I create a new document. If it is just ‘http’ (without the ‘s’), I get back a list of documents in json format.

Subject: Very strange …

Apparently, when you use HTTP to send a POST request, it is changed to a GET request before the data service sees it. I’m assuming that’s the case because “GET /{database}/api/data/documents” should return a list of documents.

I can’t explain why that’s happening. Also, I can’t explain why you have better results with HTTPS, but maybe that’s beside the point. In the long run, it is definitely better to use HTTPS.

– Dave

Subject: indeed…

Thanks for your comment.

On the server, I do force all http traffic to https, so that probably has something to do with it. It seems that somehow, in the transition to https, the POST turns to a GET. But now that I understand what is happening, it is no problem and DAS is working great.