I am working on webMethods designer and i am using pub.client.http in a flow service.
Following are the values given:
url: {service end point}
method: post
load As: bytes
data->string: input
headers–>Authorization: OAuth token
My issue is:
When i am passing the request, I am able to get success response but i see the input and OAuth token in the URL. requestlink?string={}Authorization={}
Is there a way i can remove input string and Authorization from the URL?
Can you share the screenshot of the flow where you call pub.client:http ? It should look like this for headers. The fields in the headers that I connected are made up, You need to set it yourself for the end point you are calling, or import it and let IS to set it automatically. I think you are sending these parameters to url instead of headers but its impossible to know for sure before seeing it. Follow the document below for reference.
Can you also show the args below data and the url that you mapped manually like in the picture below? Headers look correct to me. I think you are sending these values yourself. You can mask the webservice url, all I want to see is if there is something added after “?” to service URL or if anything mapped to the arguments in data. Please also include if there is anything substituted from pipeline(variables enclosed with “%”).
With this configuration you shouldn’t get those values in URL. May be I am missing something. Can you also make sure you are not adding these fields to the JSON string you are creating? By the way it looks like you are converting a string to byte and then byte to string again. That part shouldn’t be necessary.
Looks to be conflicting screen shots – the first shows jsonString, a later shows xmlString. @Abhishek_Thalla which is it?
The service is behaving as though the content type is application/x-www-form-urlencoded. That’s an educated guess since this type will put the data on the URL but still just a guess.
But we likely can stop guessing – based upon the URL shared, this is a public API that is being called. Should be able to figure out exactly what is needed – is there API documentation that illinois.gov shares publicly?
AFAIK with the parameters you send to http client you shouldn’t see those 2 fields in your request url.
Can I ask what makes you think you are sending those parameters in the url? Is there any screenshot that you can share with us? As far as I can tell you should not see those values in the url. Also can you increase log level for http requests and share the related wrapper.log and server.log entries with us?
The part you shared is in the json you created and shared with us. If you don’t want that string you send to be sent in query parameters, you should move it to body. These values are not added automatically though, they are already in the json string you built.
That is why the inputs are being shown in the browser. That is how “Run in Browser” works – it launches a browser and creates the URL with the inputs as URL parameters.
There is nothing you can do to avoid that. And I assume that people will not be running this service manually in their browser.
Based upon this info, this looks to be a non-issue. This has literally nothing to do with the use of pub.client:http.
If you have any other concerns, please provide what the service is intended to do and the context in which it will be called/used.