REQUEST DOCUMENT WITH DATA gives me 401 http response

Hello, this is my first attempt at using the Request Document WITH DATA statement. If I comment out the WITH DATA lines, I get a 200 and parse the document, no problem. But if I try it WITH DATA as in the code below, I get the 401 response. Is it my code or do I need something else done to the file permissions or access? Thank you.
HELLO
#RC: 401
HTTP RESPONSE 401 RECEIVED
(which means access denied).
------code snippet below----------------
ASSIGN #FROM =
https://dpdev1.dp.utexas.edu/nlogon/wci/sample.xml
**
WRITE ‘HELLO’
**
COMPRESS
‘<?xml version="1.0" encoding="ISO-8859-1" ?>’
‘’
’ ’
’ Gambardella, Missy’
’ XML Developer Guide’
’ Agriculture’
’ 44.95’
‘<publish_date>2000-10-01</publish_date>’
‘An in-depth look at driving farm tractors’
‘with XML.’
‘’
‘’
INTO #DOCUMENT

REQUEST DOCUMENT FROM #FROM
WITH
DATA ALL #DOCUMENT
RETURN
PAGE #PAGE
RESPONSE #RC
GIVING #RTERR
**
WRITE ‘=’ #RC
IF #RC NE 200 /* TEST FOR HTTP RESPONSE 200 = ‘OK’
WRITE ‘HTTP RESPONSE’ #RC ‘RECEIVED’
ESCAPE ROUTINE
END-IF
*

using the DATA ALL clause causes Natural to send the request as a PUT, so presumably you are attempting to store the document you are sending. Which probably requires different permission levels than a GET or POST, which are typically “read” requests.

You need to check the permission settings for the service you are calling. Web servers don’t usually default to letting you do writes to their file systems.

Thank you, that is what I suspected. I’ll check with the web server admins and see what needs to be done.

See documentation:

You can add a header ‘Request-Method’ to overwrite the internally computed PUT

WITH
HEADER
NAME ‘Request-Method’ VALUE ‘POST’

→ May have a look at the code sample “Issuing a SOAP request and parsing the response”