on 2019 Jul 05 8:15 AM
In PostMan I'm able to pass a json in the body to a HTTP:GET.
How can this be resolved in SQL Anywhere
I have created this function.
create function PM_GetConnectionShippingLineTariff(in in_Json long varchar,in baseurl long varchar)
returns long varchar
URL '!baseurl/api/fetch-connection-shipping-line-tariff'
TYPE 'HTTP:GET'
SET 'HTTP(VERSION=1.1)'
HEADER 'Accept: application/json'
What do I need to change to pass the in_Json in the body of the request?
Request clarification before answering.
A GET request does not contain a body according to the HTTP specification. If you want to send a document in the body then you need to use a POST request. To do this, you could just change your definition to be TYPE 'HTTP:POST', but you may also want to change the function's name to be PM_Post...
HTH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
50 | |
9 | |
8 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.