Reputation: 467
I am trying to call a put request using NotesHTTPRequest (HCL Notes Release 11.0.1 SHF92) Unfortunately, it seems the returned response code is wrong.
When I call the service using Postman with a valid body, I get response code 204 No Content. This is intended, since the service is not returning any response. If - using Postman - I use a wrong body, I get response code 500 with an error message.
I am trying the same in a lotusscript agent
Dim request As NotesHTTPRequest
Set request = session.Createhttprequest()
Dim jsnav as NotesJsonNavigator
'... build jsnav ...'
Call request.Setheaderfield("Authorization", "Basic " + EncodeBase64 (user + ":" + password))
request.preferstrings = True
Dim response As String
response = request.put(url, jsnav.stringify())
Print request.Responsecode
The code prints 'HTTP/1.1 100 Continue', regardless the content in jsnav.
Is ResponseCode not implemented for a put request?
Is there a way to get the same response code as it is returned using Postman?
Unfortunately I cannot give any details on the called api, since this is a private company service.
Update: It seems that there is more going on, because - when I put the request with wrong authentication credentials, I still get 100 (in Notes, not in Postman).
Upvotes: 1
Views: 758
Reputation: 231
Sounds like you are running into JCORBXUP3G which was fixed in 11.0.1 FP3 https://support.hcltechsw.com/csm?id=kb_article&sys_id=54ab87b1db88f010cc426275ca96190e
Upvotes: 3