Hi,
I 've a Restful webservice that perfectly worked. Sinds yesterday i always receive a HTTP Error 400 and i don't know why
Here is my curl :
curl
http://127.0.0.1:8091/ws/r/webshopv2/v1/gab1 -v -H 'Content-Type: application/json' -d '{"locale":"fr"}'
* Expire in 0 ms for 6 (transfer 0x5589e17759a0)
* Trying 127.0.0.1...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x5589e17759a0)
* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0)
> POST /ws/r/webshopv2/v1/gab1 HTTP/1.1
> Host: 127.0.0.1:8091
> User-Agent: curl/7.64.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 15
>
* upload completely sent off: 15 out of 15 bytes
<
HTTP/1.1 400 Content-type not */xml< Server: GWS Server (Build 202204201231)
< Connection: close
< Date: Wed, 15 Jun 2022 19:22:14 GMT
< Content-Length: 0
<
* Closing connection 0
Console Debug :
WS-DEBUG (Security Info)
OpenSSL 1.1.1n 15 Mar 2022
WS-DEBUG END
WS-DEBUG (Security Warning)
Crypto library doesn't have any ZLIB compression algorithm.
WS-DEBUG END
WS-DEBUG (Security Warning)
SSL library wasn't compiled with support of RLE compression.
SSL library wasn't able to initiate the ZLIB compression library.
WS-DEBUG END
WS-INFO (Certificate authority) | Loading from directory /opt/fourjs_401_00/fgl/web_utilities/certs | Loading from directory /etc/ssl/certs | Loading from directory /usr/lib/ssl/certs
WS-DEBUG (Receive)
POST /ws/r/webshopv2/v1/gab1 HTTP/1.1
WS-DEBUG END
WS-DEBUG (Receive)
Host: 127.0.0.1:8091
User-Agent: curl/7.64.0
Accept: */*
Content-Type: application/json
Content-Length: 15
WS-DEBUG END
WS-DEBUG (Send)
HTTP/1.1 400 Content-type not */xml
WS-DEBUG END
WS-DEBUG (Send)
Server: GWS Server (Build 202204201231)
Connection: close
Date: Wed, 15 Jun 2022 19:22:14 GMT
Content-Length: ???
Content-Encoding: ???
WS-DEBUG END
And here is my code :
PUBLIC FUNCTION benjamin(jsnGab t_jsnGab ATTRIBUTES (WSMedia = 'application/json'))
ATTRIBUTES(WSPost
,WSPath = "/v1/gab"
,WSDescription = "Test"
,WSRetCode = "201:Ok"
,WSThrows = "400:Bad Request,500:Internal Server Error")
RETURNS(STRING ATTRIBUTES(WSMedia = 'application/json'))
RETURN jsnGab.codlng
END FUNCTION
Any help would be appreciated ...
Thanks in advance