Questions tagged [response]

A response is a general term for a message which is sent as an answer for previously made request.

A response is a general term for a message which is sent as an answer for previously made request.

A request/response scheme is present in almost any communication protocol, particularly there message delivery is guaranteed, for example TCP, HTTP, etc.

Further Reading:

5919 questions
1
vote
2 answers

Regexp to remove extra quotations marks so I can load the string as JSON -Python

So I'm getting some data in the form of a string as a response after I make a request using the requests library, which I wanna finally convert into JSON using json.loads() method. The string is quite messy so I have to clean it so that it can be…
1
vote
0 answers

Laravel: Load an API Resource key only if the given resource instance is the top level

I have a Term model who has a "parent" relationship that points to another term in the terms table. I load these relationships recursively, and return a Term resource. The resource references the taxonomy the term is related to. class Term extends…
mindfullsilence
  • 344
  • 9
  • 23
1
vote
1 answer

Jersey:Returning a Response with a Map containing Image Files and JSON String values

I am using Jersey JAX-RS. I want to return a Response with a Map containing Image Files and JSON String values. Is this the right way to do this: Map map = new HashMap........ GenericEntity entity = new…
Vijay
  • 595
  • 1
  • 13
  • 27
1
vote
2 answers

Retrofit 2 Request works in Postman but not in App

I have the following code which makes an API call to get Addresses from Postcode. fun getAddressFromPostCode(postCode: String): List
{ val trimmedPostCode = postCode.replace("\\s".toRegex(),"").trim() val dataBody =…
Alex Petev
  • 501
  • 5
  • 19
1
vote
1 answer

Why does the my res.sendFile() send html to the browser console instead of rendering a new html page?

I'm practicing server requests (using express JS | v. 4.17.1) through an exercise that is supposed to have the following sequence: click button : send server request (using jQuery $.get) : send res file from routes.js page The issue is that the…
Arthur L.
  • 17
  • 6
1
vote
1 answer

Render back response after job completion - Delayed jobs

Earlier I had my controller class which was creating an instance of the service and calling the service method 'synchronize' as below. After the 'synchronize' method was getting completed, rails used to render a JSON message back to my node.js. if…
Vishnukk
  • 524
  • 2
  • 11
  • 27
1
vote
1 answer

mock response.elapsed in requests_mock

I'm using requests_mock in my unit tests and would like to mock response.elapsed attribute but have't found proper way to do it. Just found a workaround with adding sleep to text callback. with requests_mock.mock() as m: def…
Alex M981
  • 2,264
  • 14
  • 24
1
vote
1 answer

Response takes a lot of time when using filter in spring boot

I am running out of ideas how to solve this strange filter issue. Here is what I am running right now: Development machine: Windows 10 Java JDK 13.0.2 Eclipse 2020-03 (4.15.0) VPS Server: Centos 7 (Linux version…
1
vote
4 answers

Convert JSON from request into string c#

I'm working with REST services from Oracle database, and I'm trying to cast the json response into my class model, but I can't get it, this is the type of the JSON { "items": [ { "id": 2, "role_id": 1, …
1
vote
1 answer

How can I parse xmlrpc response (Odoo API read), using Java

I have to fetch the category a product is related to, using the read method of Odoo API. I get a list of objects, then for each category, I need to extract the field product_tmpl_ids, a list of integers. I'm not sure how to do it. This is the…
1
vote
1 answer

How to return HTML file as Symfony response

I'm new to Symfony and am trying to understand that controller response function. I just want to return a simple HTML file home.html, that at the moment just has a Hello World line in it. How do I return the file as a response? As it stands with the…
user10724876
1
vote
0 answers

Sometime Client have resp 400 - Bad Request from Server

I am handling server SOAP client, sometime I have reviece response : 400 - Bad Request => I set in code: System.setProperty("com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump",…
LONG DO
  • 82
  • 1
  • 5
1
vote
1 answer

ASP.NET Core MVC Ajax post on success returning html page and then in the page shows only a json?

Basically I call the SendInvoince method from the controller and an invoice is sent! The problem is with the ajax post upon success the data is the html page instead of the json returned from the controller method, poping up the swal error and after…
MarchalPT
  • 1,268
  • 9
  • 28
1
vote
3 answers

Nested JavaScript Fetch

I have a fetch statement that relies on the value of another fetch statement. When I execute the below, the first fetch succeeds (returns the user), but the second fetch that relies on the value from the first fails with TypeError: Failed to fetch.…
Jack
  • 11
  • 4
1
vote
3 answers

How to get headers from http response in VueJS?

I use axios to retrieve some data from backend. I send a request and i have a response. I want to read some of my headers. I've tried many things but no one is working. My headers contains the following headers 'content-type', content-length',…
Pracede
  • 4,226
  • 16
  • 65
  • 110
1 2 3
99
100