Is there any need of/or any support for Axios as library parameter in config file while generating client stub using swagger-codegen?
If you are using VueJs and Axios, there is a swagger-codegen for that:
https://github.com/chenweiqun/swagger-vue
Just run in update api-docs url and run in node.
Related
trying to upload file using trest client component with post method.
Able to upload file using postman post call.
Same thing is not working in Talend.
Getting 415 error.
trying to upload file using trest client component with post method.
Able to upload file using postman post call.
Same thing is not working in Talend.
Getting 415 error.
In tRestClient, Query parameters are string parameters, so even if you pass your file path in the "file" parameter, only the file path is passed as a string to your api and the actual file will not be uploaded.
You can upload a file using tFileFetch component, by checking "Upload file" in the advanced settings.
I am creating a web API that returns JSON. Currently I am able to call the endpoint with jquery and php curl but I am not able to do so using JSP HttpsURLConnection.
It gives me a handshake_failure exception. Is there anyway that this can be solved without having to install a file in the jsp server ? I am doing a REST service so it doesn't make sense for all my users to install a file to call it.
Will this also affect the calling ?
I'm trying to consume a simple API just for test, but it doesn't work using Delphi Rest Clients components.
Call to API works using browser and Postman without any configuration. The URL is https://api.cartolafc.globo.com/mercado/status
First I've tried use the tool "Rest Debugger" and it returns nothing.
So I tried to use the trio of REST CLIENT components by doing the following steps:
Created a new project;
Added TRestClient, TRestRequest and TRestResponse components;
Configured BaseURL from TRestClient as "https://api.cartolafc.globo.com/mercado/status"
Clicked the right mouse button on the TRESTRequest component
Hit Execute... command
It returns the following error:
Error receiving data: (12152) the server returned an invalid or unrecognized response
Did I do something wrong?
I am trying to consume a rest webservice (invoked by Talend Open Studio for ESB job) in an angular2 application but when i run my application, i get this error :
XMLHttpRequest cannot load http://localhost:8088/. No
'Access-Control-Allow-Origin' header is present on the requested
resource. Origin 'http://localhost:3000' is therefore not allowed
access.
When I have this issue and i cant do nothing in server, i just use concurrently and corsproxy like dev dependencies in my package.
"concurrently"
"corsproxy"
and add this script to package:
"dev": "concurrently --kill-others 'corsproxy' 'ng serve -o'"
Now you need configure your angular project to make request to the proxy, in my case I add this line to my enviroments file:
apiBaseUrl: 'http://localhost:1337/serverUrlApi'
And in my Http interceptor add this line to all my request.
I am trying to test web service for my project. The Web service accepts a SOAP request and gives appropriate response.
In JMeter I have chosen SOAP/ XML-RPC request. It works completely fine for me and gives me correct response. However, I have more than 100s of web services in my scope of testing and I have to test them in different environments. It is very cumbersome work to change the URL value from the SOAP/ XML-RPC sample to point it to different env. Do we have something like HTTP Request Default for SOAP/XML-RPC requests?
I have also tried a bean shell sampler where I am setting the value of a variable and then retrieve it in the SOAP sampler URL parameter. However it did not work for me. Below is the code.
Bean Shell sampler code:
vars.put("baseURL","http://localhost:9191/ws/soap");
SOAP/ XML-RPS Sampler URL value:
${__BeanShell(vars.get("baseURL"))}
Any suggestions? I read in JMeter docs that this can be done via http sampler, however, I want to avoid using the same if possible.
You should avoid using SOAP/XML-RPC in favor of pure Http Sampler.
Use the "Templates..." (menu) > Building a SOAP Webservice Test Plan:
This way you can use HTTP Request Default if you want.
But note from what you describe, using a CSV Data Set Config would allow you to variabilize the URL.
Use JMeter Properties to set base url like:
in user.properties file (under /bin folder of your JMeter installation) add one line per property:
baseURL=http://localhost:9191/ws/soap
alternatively you can pass the property via -J command line key as:
jmeter -JbaseURL=http://localhost:9191/ws/soap -n -t /path/to/your/testplan.jmx -l /path/to/results.jtl
Refer the defined property in your test plan using __P() function
${__P(baseURL,)}
You can even provide the default value, i.e. if the property is not set via user.properties file or command-line argument - default value will be used:
${__P(baseURL,http://localhost:9191/ws/soap)}
See Apache JMeter Properties Customization Guide for more information on JMeter properties and ways of setting, overriding and using them.