B4J Question B4J and Curl

Shay

Well-Known Member
Licensed User
Longtime User
Hi

I am trying to send curl commands, and I am sending this, based on same thread I saw here

This is what I want to send:
curl 'https://localhost:8080/S/api/v1/administration/user/password/firsttime' \
-H "Authorization: Basic YWaaaaaaaahMndzM2Vk" \
-X POST \
-H "Content-Type: application/json" \
-c cookies.txt \
--insecure \

this is what I am writing:
B4X:
IP="https://localhost:8080/S/api/v1/administration/user/password/firsttime"
Job1.Initialize("Job1",Me)
Job1.PostString(IP ,"")
Job1.GetRequest.SetHeader("Authorization: Basic YWaaaaaaaahMndzM2Vk")
Job1.GetRequest.SetContentEncoding("application/json")

I am getting this error:
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated

looks like it is not sending the "SetHeader"
 

Shay

Well-Known Member
Licensed User
Longtime User
I am not using certificate.
This is base 64 username AND password, this is working fine with real curl client
the API is not supporting separate base 64 for user and password
 
Upvote 0
Top