Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Due to some maintenance operations, stambia.org will be switched to read-only mode during the 13th November. It will be possible to read and download, but impossible to post on the forums or create new accounts. For any question please contact the support team.

Topic-icon Question How to invoke a webservice PUT ?

More
26 May 2017 11:14 - 26 May 2017 11:15 #1 by Emmanuel Rambeau
Emmanuel Rambeau created the topic: How to invoke a webservice PUT ?
Good morning,

I work with webservices supplied by an entity to get data. I just have to set in input a security code. Usually, it's very simple, because it is with the verb GET.
The URL is like the following :
https://myrandomserver.com/api/domain/v1/licensedUsers?securityCode=XXXXXXXXXX


For unknown reasons, the API I'm trying to use works with the verb PUT (even it is only to get data, as previously).
The curl syntax (which works) is the following :
curl -X PUT https://myrandomserver.com/api/library/v1 -d securityCode=XXXXXXXXXX


How can I invoke it with Stambia ?

I created, in my metadata, a new port with the verb PUT.
Next, I tried several things, like executing with only the modification of the verb, next modifying the binding type of the input, or finally set a HTTP header. But I didn't found the right issue.

I'm facing this error :

POST requests require a Content-length header.
(even it is effectively PUT...)


Could you please advise me ?

Thank you in advance.

Regards,

Emmanuel
Last Edit: 26 May 2017 11:15 by Emmanuel Rambeau.
More
29 May 2017 13:47 - 30 May 2017 10:26 #2 by Emmanuel Rambeau
Emmanuel Rambeau replied the topic: How to invoke a webservice PUT ?
Hello,

Solved by setting in the input type parameter : binding type = mime:content, and content-type = application/x-www-form-urlencoded.

Emmanuel
Last Edit: 30 May 2017 10:26 by Emmanuel Rambeau. Reason: English traduction