Azure data factory web task altering body causing web call to fail - azure-data-factory

I am placing a web task call to an api.
The body is simple
["val-01-001"]
(note, this works with either single or double qoutes)
If i use this exact value for the body in postman, it works.
If i use this exact value in the body of the web call, the web call tells me "The posted data is not valid. Perhaps it is not well-formed or match with the samples.Please verify."
I dont have access to the api code or backend so i cant see exactly what its receiving.
Any idea what Data factory might be doing to the body causing it to be rejected?
I added a Content-Type header with a value of application/json, but this didnt help.
Below are the input and out from the web call and the same call in postman, which works:
Web Call input
Web call output
Exact same call in postman

Related

how/where to add token in http get request in Rest Debugger Delphi

web-service has token parameter. In swagger and postman I send get-request properly (status 200). In Poastman creating request is very easy because it has separate pages for parameters and headers.
As for Rest Debugger I couldn't create and sent right get-request( appears error 400).
I tried many ways but without success:
I write token in request parameter section of Rest Debugger as key-value pair like "token"= "abcd12345..."
or
I write base URL and resouce together in URL-field like:
https://testserver.com/currencies?token=abcd12345..... or
I write resource separately in resouce field of Rest Debugger and base -URL in URL-field
but in all cases server returns error 400:
"the token field is required".
screens of swagger, curl, postman and rest debugger.
We suppose that a better solution is to use Postman for this task, if it works as expected and is more user-friendly. But if it’s principal thing – you can do it in Rest Debugger.
Go to the “parameters” tab -> click the “Add” button -> change “Kind” field to “HEADER” -> “Name” field to ‘’token” -> “value” to your token value.
You can see that in Postman you use a header to send token value, but in Rest Debugger simple param – that’s why you get different results.
Try to define it as header.
Use Parameter section and use [HEADER] instead of [GET/POST]

REST Client extension - API response as HTML

I wanted to use vs code's extension REST client for testing purposes. So I used a curl of an existing API running on my local machine. But instead of JSON, I got HTML as a response. The curl works as expected in the terminal but not with the extension.
The same Behaviour is with another extension named Thunder Client.
Postman is getting JSON responses for the same API I believe that issue lies within vs code itself, I just don't know how to resolve it.
According to this article:
https://softwareengineering.stackexchange.com/questions/207835/is-it-ok-to-return-html-from-a-json-api
If you have declared you only accept one format in the header then the service should only send back that format or throw an error. If you have not put an ACCEPT in the header, the the service may send back whatever.
Check what is in the ACCEPT header:
But also check how Thunder Client translates the call in powershell:
I see that in my call the response is translated to JSON. I would guess that most REST clients are assuming that users want to work in JSON. Maybe that's what your two REST clients are doing?

Cloudinary Error: "Missing required parameter - file" via REST API

I'm just getting started with Cloudinary, and I'm attempting to Uploading with a direct call to the API. Using the DHC REST Client (chrome extension), I put my request together per the instructions found here at Creating API authentication signatures. Here's a screenshot of that request and response.
I also tried...
adding quotes around all values except timestamp as shown in the example
making the request a multi-part request and attaching the image to the body as a "file"
deleting timestamp, api_key, and signature and instead replacing them with upload_preset to try and upload an unsigned image (yes, I created the preset)
And finally, I did try adding public_id even though it says it would assign one if not provided.
In all cases, I get the same error response... Missing required parameter - file
Can anyone tell me what I'm missing?
Ok, figured it out. These name/value pairs need to be added to the body of the request rather than the header. Here's what that would look like in the DHC client. Note that the upload_preset will not work for you... I only created it to test with. Also note that doing a signed request is accomplished the same way but with different parameters.

Why am I getting request method GET not supported?

I am using PostMan as a REST client to test this API method Cisco ACL Analysis API. specifically POST /acl/trace or getAClTracksStd (first go to Policy Analysis)
Here is my PostMan HTTP test call
Does anyone who is familiar with PostMan understand why I am getting this "Request method 'GET' is not supported" error from the server? I am making a POST HTTP request, not GET.(Selected from Drop down menu) It make more sense for me to get a input invalid parameter error or something.
Just to show that the endpoint url works, heres a HTTP test request that works
(same link, host->host API -> GET /host/{startIndex}/{recordsToReturn}
There's two issues that I'm seeing with your REST call. First, the error you're seeing is because the call needs to be preceded by "https://". Second, remove the interface IDs parameter and values. You should get a response with data after making these changes.
Your json looks erronuous (comma after the destIp) - and the server probably always responds with a default confusing error message in this case. (Postman is very well tested and it sends POST).

How to pass parameters to soap in classic asp

I need to call a web service from my classic ASP website. I have been provided with a URL and three variables from the SOAP provider:
URL of web service: http://www.theirwebsite.co.uk/B2bservice.asmx
Parameter1: CustId
Parameter2: PWord
Parameter3: OrderNo
So I'm supposed to send this SOAP request from my classic ASP website, along with the parameter values (which I've been given too) and it's supposed to return a string.
I've tested the SOAP response using soapclient.com, and sure enough if I enter the web service URL and add the paramter values, it returns a string, like it should.
The problem is I just can't find how to do it with classic ASP!! I've found numerous examples of calling a SOAP URL from classic ASP, but none of them mention how to pass parameters.
Can someone please show me a simple-as-possible implementation of how I get the return string from this web service in ASP, passing the parameters in?
Many thanks in advance for any help.
Dan, you have to change the GET for a POST
I don't know much about classic ASP and don't know if it has a SOAP client implementation, but if classic ASP allows you to send an HTTP POST with an arbitrary body and arbitrary HTTP headers, it should be possible to do what you want (in a somewhat hacky way).
Just issue a POST request with the entire SOAP message hard-coded except for your parameters. Make sure to get the Content-Type and SOAPAction headers right.
If you don't know how to properly create a valid SOAP message and to properly set the headers, use a tool like http://web.progress.com/en/actional/actional-diagnostics.html to send a test message, then use a tool like Fiddler to take a look at what was actually sent, and then hard-code it into your app.