Are there known issues with making a PUT request with the HTTP ABL client? I am trying to send JSON.
My test case works as expected in a REST client (Insomnia) but fails when 403 when I use ABL.
I have no issues with GET requests to this same server. Any clues on where to start looking?
httpClient = ClientBuilder:Build():Client. httpRequest = RequestBuilder:Put(cPut,oPayload):ContentType('application/json'):UsingBasicAuthentication(credentials):Request. httpResponse = httpClient:Execute(httpRequest). MESSAGE httpResponse:StatusCode VIEW-AS ALERT-BOX
The problem is with the user's access on the server. You authenticated successfully, otherwise you would have received 401, but you user does not have authorization to perform the action.
401 = Authentication failed or you did not even try to authenticate.
403 = You did successfully authenticate but you have no access to the given URL.
Hi Simon. I agree that seems to be the case. The only "odd" thing is that it works fine using curl with the same credentials.
Jeff, What kind of server are you trying to access ?
cURL sometimes explicitly set all headers by default(like Accept: */*), where as in the HTTP Client it takes what you gave. I was seeing this problem while I was accessing PASOE OEManager REST API's. The accept type is not application/json, instead it is a application/vnd+progress+json