Questions tagged [web-client]

WebClient is a class for .NET Framework applications that provides methods for sending and receiving data from a resource identified by a URI.

43 questions
92
votes
6 answers

WebClient vs RestTemplate

As per spring 5: WebClient is an interface representing the main entry point for performing web requests. It has been created as a part of the Spring Web Reactive module and will be replacing the classic RestTemplate in these scenarios. The new…
KayV
  • 12,987
  • 11
  • 98
  • 148
25
votes
4 answers

Get API response error message using Web Client Mono in Spring Boot

I am using webflux Mono (in Spring boot 5) to consume an external API. I am able to get data well when the API response status code is 200, but when the API returns an error I am not able to retrieve the error message from the API. Spring webclient…
Mohale
  • 2,040
  • 3
  • 17
  • 18
7
votes
2 answers

Invoking a 'REST' service which have query parameters in the URL

I have to invoke a GET on a service which returns text/xml. The endpoint is something like this: http://service.com/rest.asp?param1=34¶m2=88¶m3=foo When I hit this url directly on a browser (or some UI tool), all's good. I get a…
TJ-
  • 14,085
  • 12
  • 59
  • 90
4
votes
1 answer

Submitting a form using html unit

I want to login https://pacer.login.uscourts.gov/csologin/login.jsf. i have used html unit for submitting a login form. here is my code: public void submittingForm() throws Exception { final WebClient webClient = new WebClient(); // Get…
4
votes
2 answers

Web-based clients vs thick/rich clients?

My company is a software solutions provider to a major telecommunications company. The environment is currently IBM WebSphere-based with front-end IBM Portal servers talking to a cluster of back-end WebSphere Application Servers providing EJB…
4
votes
3 answers

How create a java object from CXF Webclient response

I'm writing a wrapper REST API (say API X) for an available REST API (say API Y) written in Apache CXF. For the wrapper I'm using CXF Webclient. This is how I call Y from X. @GET @Path("{userName}") public Response getUser(@PathParam("userName")…
Bee
  • 12,251
  • 11
  • 46
  • 73
3
votes
2 answers

Converting Mono to Pojo without block

Is there a way to convert Mono objects to java Pojo? I have a web client connecting to 3rd party REST service and instead of returning Mono I have to extract that object and interrogate it. All the examples I have found return Mono but I have…
No_One
  • 215
  • 2
  • 3
  • 11
2
votes
1 answer

Testing a Django driven web app

I have a web app that opens and closes background process on the server. I want to simulate multiple users logging in and out of the site as well as pressing all the buttons (general interaction). I am testing the app in general as well as how well…
michael
  • 2,577
  • 5
  • 39
  • 62
2
votes
0 answers

line 1:0 no viable alternative at character 'H' exception

i was trying to create a client server web api where the client calls a web-service say web1 and then web1 becomes a client of another web service say web2. web2 returns to web1 and thus the client executes. my aim is to create a web services…
2
votes
1 answer

Error while consuming REST Endpoint using Spring WebFlux Client

I'm just started using Spring reactor 3 (WebFlux).When trying to use WebClient to consume REST endpoint to return Flux I'm getting following error. Application class: @Bean public WebClient client(){ return…
jay
  • 477
  • 5
  • 13
2
votes
1 answer

How to keep HTTP session with arduino ethernet shield and web client

I want get json from my website. I am trying send POST request for authentication and after it i want to send GET request for getting json, but i can't do it, because it gives me en error 401 unauthorized (cookies doesn't saved) . How can i keep…
EgorkZe
  • 391
  • 1
  • 4
  • 15
2
votes
2 answers

How to upload files from web client (HTML/jQuery form) to your Dropbox folder

I have a web page with a form. I want the user to upload file to a Dropbox folder and get the download link. Also I don't want the form to ask the user for authentication in order to upload the file. How can I do this? I registered an App for this…
Todo
  • 657
  • 1
  • 10
  • 24
1
vote
1 answer

Modify OpenERP 6.1 product form view in web client

I'm trying to modify the product view of OpenERP 6.1 (web client) to include my own widget, allowing me to select a color using three sliders. This is a very simple requirement, some times we'll need to customize a specific web view to change the…
1
vote
0 answers

Error while running WebClient. No error while debugging it

I am trying to fetch HTML from a website. I can successfully fetch it using WebClient but only when I am debugging the code. When I ctrl+f5 it just throws an error and shuts up. Why? Here's code: string input = " a href=\"/.* .* /a ";…
user900360
1
vote
2 answers

How to use futures in Vertx routers with WebClient in Java

I have a Vertx application with a router endpoint: router.route(HttpMethod.GET, Constants.ENDPOINT).blockingHandler(this::getItems); This router calls a method, that is supposed to return a JSON object in the browser, or whatever client is calling…
aCarella
  • 2,369
  • 11
  • 52
  • 85
1
2 3