FAQ Database Discussion Community


Multiple Json response to html Table format

php,mysql,json,table,response
I want to fetch data from different servers Database and i need to shown in one Centralised server. So i have written a SELECT query in different locations and i am trying to fetch in one Centralised Server. I am getting a JSON Array response. But i tried displaying it...

How to treat response objects in python?

json,list,python-2.7,get,response
Ok i got a response using the reply command reply = requests.get(http://api.eve-central.com/api/route/from/Jita/to/New Caldari I have trouble dealing with the recieved data, isolating the data i want. How can get for example the value of the to: region: regionid: path? This is what i get by using print reply.json() (reply.json()'s type...

Python urllib response returns file with added blank lines

python,xml,httprequest,response,urllib
While testing services I created a function in python that call http request on access point URL. Response is saved to the file in a given path. import urllib.request import urllib.response import urllib.parse def get_response(service_access_point, request_parameters, response_file_path): req = urllib.request.urlopen(service_access_point.format(request_parameters)) res = req.read().decode('utf-8') response_file = open(response_file_path, 'w') response_file.write(res) response_file.flush() response_file.close()...

Response byte[] to String[]

java,android,response,httpresponse
I get a byte[] response from a server with access token information: @Override public void onSuccess(int statusCode, Header[] headers, byte[] response) { Log.d("RESPONSE: ", new String(response)); } Response is: D/RESPONSE:﹕ {"access_token":"8863e1a8c16e2ce70b4d5a04a209e265bc1efe91","expires_in":3600,"token_type":"Bearer","scope":null} How could I parse this response to easily get any object(access_token, expires_in, token_type, scope) of response? ...

How to get value from the JSON response

jquery,json,response,value
I get the following response from the server: {"aster":"3","daffodil":"4","rose":"3","totalItems":10,"totalPrice":"31.90"} RESPONSE and, I want to put it in the table that will look like this: The problem is that I do not know how to get values (for the "Quantity" column). This is my code: function processServerResponse(data) { if (data.products.length >...

AJAX trigger remote script then check for success-response

javascript,jquery,ajax,response
I've been searching my brains out but I can't seem to wrap my head around the little help I find. I'm running a database that is being fed by data from another DB. The csv transport is handled by a third party server providing executable "flows" which compile and deliver...

Where is HTML renderer of View Results Tree hidden in Jmeter 2.13

html,jmeter,response,updates,hidden
Where is hidden HTML response renderer option? This happened to me after update jMeter to 2.13 r1665067. ...

Guzzlehttp - how do I work with / get my expected response?

php,response,guzzle
I'm trying to write a wrapper around an api my company is developing. It's restful, and using Postman I can send a post request to an endpoint like http://subdomain.dev.myapi.com/api/v1/auth/ with a username and password as POST data and I am given back a token. All works as expected. Now, when...

How do I display JSON response in below mentioned format using Spring?

java,json,spring,response
public class Country { @Column(name = "name") private String name; @Id @Column(name = "code") private String Code; //Getters & Setters ... } current response : [{"name":"Andorra","code":"AD"},{"name":"United Arab Emirates","code":"AE"}] Expected response : [ { "countries" : [{"name":"Andorra","code":"AD"},{"name":"United Arab Emirates","code":"AE"}], "status" : "ok", "message":"success", etc..etc...}] instead of status and message, it could...

Return response in JSON from AJAX command

javascript,jquery,ajax,response
How can I get native javascript AJAX to return response in JSON rather than 'text over HTML'? Description: In jquery, the following AJAX function returns JSON data, which is what we needed. JQUERY CODE //ajax Handler function through which I set default attribute and send request function defined separately to...

Java String in JSON

java,jquery,json,response
I have a problem. I am submitting a form using JSON(Jquery) and setting value in a String variable in Java Class. I want to show that String in alert box in Jquery. Here is my Code : $.ajax({ url: "//action", data: { //datas...... }, contentType: "//", dataType: "//", success: function...

Nodejs unable to kill external windows executable program executed by Node itself

javascript,angularjs,node.js,response,kill-process
I am hosting Node as a server locally to interact with hardware. My web application then makes a request to Node to execute 2 executable, whichever executable returns a data first will Respond it back to my Web Application. By doing so, it causes the other executable to still be...

Remove boilerplate content from HTML page

python,request,response,htmlcleaner
I would like to use the jusText implementation found here https://github.com/miso-belica/jusText to get the clean content out of an html page. Basically it works like this: import requests import justext response = requests.get("http://planet.python.org/") paragraphs = justext.justext(response.content, justext.get_stoplist("English")) for paragraph in paragraphs: if not paragraph.is_boilerplate: print paragraph.text I have already downloaded...

How technically rails process the request when we enter url in browser and press enter

ruby-on-rails,request,response
I am new in rails. I don't understand how rails process the request and response. When I enter the url into browser for rails app and press enter. Then can any one walk me through what heppens in detail....

scrapy hal+json unsupported response type

python,json,scrapy,response,hal
I'm trying to scrape a link that is HAL+Json according to Firefox and Safari and it is returning a response object that Scrapy doesn't recognise. The link is https://catalogue.presto.com.au/ - this opens fine in Chrome showing JSON within the browser, but if I try to use Firefox or Safari it...

html tags not working inside response tags AJAX PHP

php,html,ajax,response
I have a working code, using ajax, when an user types something into the input box, it will output 'hello' on the screen without having to press enter. However, there is a problem. Let me show you part of the working code first: <?php include('head.php'); echo "<response>"; echo "hello"; echo...

Error on second level object for nodejs response

javascript,node.js,object,undefined,response
I have this situation.., I'm making something like this: app.post('someUrl', function (req, res) { var r = res.data; var a = {}; a.name = r.name || "", a.someotherKey : { id: r.otherKey.id || "" } }); the thing is that when res.data == "", I can assign the value of...

Camel RabbitMQ Request Response Pattern Example

design-patterns,request,apache-camel,rabbitmq,response
I'm looking for a sample code wich use the Camel RabbitMQ Request Response Pattern. My use case : - A request message is depose in a RabbitMQ Queue - A Camel route consume the message, invoke an external Web Service, and reply the response based on the reply-to properties of...

ajax respsonse undefined object

ajax,object,properties,response
Although there is many posts with similar question,i couldnt managed to resolve it. I can see at Console of my browser my object returns ok as array. when i alert data.AlliasName i get undefined. my json returns {"data": [{"id":1,"FirstName":"101","LastName":"101","AlliasName":"101","Address":"kentro","Type":"1"}]} $.ajax({ url: urlreq, dataType: "json", success: handleData }); function handleData(data) {...

How do i access json response object fields

jquery,asp.net,ajax,json,response
I am trying constructing a table after my response and attemtpting to append response data to the table. My response comes back correctly as shown below Object {__type: "DomainLayer.BusinessLogic.UserOnlineCommunity", CommunityID: "15bb29d4-b451-4034-be7e-8197723e0a89", Description: "name", Detail: "yes", Link: "test"} but i am trying to access the the fields such as Description, or...

How to display pdf from byte[] stream in browser?

java,servlets,pdf,response,bytestream
I am using a servlet and passing the http response with the byte[] stream to the browser. I have set response.setContentType("application/pdf"); in my java code but it still display garbage code like : JVBERi0xLjQKJeLjz9MKNCAwIG9iago8PC9UeXBlL1hPYmplY3QvQ29sb3JTcGFjZS9EZXZpY2VSR0IvU3VidHlwZS9JbWFnZS9CaXR What should I do to correctly view the pdf into the browser ?...

C# WCF REST Service Response - remove autogenerated content

c#,web-services,wcf,rest,response
I've created a RESTful service which provides the following response: <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">hello</string> However, I want it to only return 'hello'. How can I do this? interface: [ServiceContract] public interface IApp { [OperationContract] [WebInvoke(RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.WrappedRequest, Method = "GET", UriTemplate = "/ourapi/v1/admin/certificate")] string retrieveInfo(); }...

Extracting json array from http response

javascript,arrays,json,angularjs,response
I'm new to AngularJS for a project and I'm trying to extract a json array from a http response to use in a list. The response looks like this: { "DFH0XCMNOperationResponse": { "ca_return_code": 0, "ca_inquire_request": { "ca_last_item_ref": 150, "ca_item_count": 15, "ca_cat_item": [ { "ca_cost": "002.90", "in_stock": 119, "ca_description": "Ball Pens...

jQuery events on responsive datatables not working

jquery,datatables,response,jquery-datatables
I have a jQuery event bound to an element within a data table which fires without issue when the table is full width. However, when the table is collapsed and data tables responsive is applied the event doesn't fire. There isn't anything in the console about any errors. You can...

AJAX response match any status

ajax,response
I have the following code: $.ajax( { url: "control/" + id + ".php", data: $("auth-form").serialize(), statusCode: { 200: function( response ) { }, 401: function( response ) { }, 401: function( response ) { }, } } ); I need to set callback to 'any' status, whether it's 200 or...

Magento 1.8.0.0 - Worldpay payment response receiving 301 error

php,magento,redirect,response,worldpay
Good Morning, I have recently been handed a Magento site that functions fine, however the callback integration between Worldpay and Magento seems to fail. E-mails are sent to me stating that the server is responding with a 301 error (I believe this is a redirection error). The URL that Worldpay...

Read JSON returned by AJAX call

jquery,json,response
I am new to AJAX. I am submitting my form data into a end point using AJAX. The endpoint is returning a json string with some response data. I tried many things but wasn;t able to read the JSON. I can parse the JSON. At this point, I want to...

iOS - Why does this NSString comparison blow-up? [duplicate]

ios,objective-c,json,response
This question already has an answer here: Unrecognized selector error for isEqualToString: when setting text of a label 1 answer I have looked at SO for similar questions, but am open to being pointed to a duplicate. I am receiving some JSON from a site, and I want to...

Simple error response in Laravel 5 while JSON request

php,ajax,laravel,asynchronous,response
I have project on Laravel 5, and I need to do async request via jQuery's $.ajax method. Laravel can catch exception, and then it render special error template with it's own styles and markup. But for async requests this html-code is redundant. Is there a way to generate error response...

apiary: Ignoring unrecognized block

rest,request,response,apiblueprint,apiary
I have the following definition in apiary for a service to post access rights: ## Access Right [/api/v0.3/accessrights/{id}/assign?isExternalKey=true] ### Assign access rights [Post] + accessRightId (number) + personId (string) + Parameters + id (number) - ID of the Access Right in the form of an integer + Request (application/json) {...

how to print response from an api in php separately

php,arrays,api,printing,response
i am able to print the response from an api but it is nested array i am not able to save it. Array ( [statuscode] => 0 [status] => SUCCESS [item] => SimpleXMLElement Object ( [item] => Array ( [0] => SimpleXMLElement Object ( [BENEID] => 227287 [BENENAME] => test...

jmeter response times based upon database update

jdbc,jmeter,response
As per my previous 2 threads - I'm new to Jmeter and need to performance test a new web app - I am making progress, but I need a couple of pointers if that's ok. My Environment: JMeter v2.11, JDK 7, Remote Oracle 12 RDBMS There is a system (A)...

get property from data variable in ajax jQuery

javascript,jquery,ajax,response
I try to get value of the variable what lay in response object(data variable). Here is what I get when console.log whole data: {"comment_id":7,"view": ...... But when I try this to get comment_id I getting undefined: console.log(data['comment_id']); // undefined console.log(data.comment_id); // undefined What I am doing wrong?...

Issue with getting data from a JSON object [duplicate]

javascript,json,response
This question already has an answer here: Access / process (nested) objects, arrays or JSON 6 answers I have a response from an Ajax POST request which looks like this: { "columns": [ "r" ], "data": [ [ { "extensions": {}, "start": "http://localhost:7474/db/data/node/2762", "property": "http://localhost:7474/db/data/relationship/2709/properties/{key}", "self": "http://localhost:7474/db/data/relationship/2709", "properties": "http://localhost:7474/db/data/relationship/2709/properties",...

how to get response body during 400 error in http oubound gateway

response,gateway,outbound
i have gateway -> chain -> http:outbound-gateway -> transformer for the gateway i have error-channel to handle 400 responses from outbound-gateway. the payload I get in the error channel is the MessageHandlingException. It does not have a way retrieve the response body. Is there a way i can get response...

AngularJS json.parse unexpected end of data at line 1 column 1 of the json data

javascript,json,angularjs,http,response
html <!doctype html> <html lang="en" ng-app="phonecatApp"> <head> <meta charset="utf-8"> <title>WrikeAPI</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> <script src="https://code.angularjs.org/1.4.0-beta.5/angular.js" data-semver="1.4.0-beta.5" data-require="[email protected]"></script> <script data-require="[email protected]" data-semver="1.4.0-beta.5"...

How to get data from response

java,database,web-services,request,response
I have created 2 web services and I was able to send some data. Using this three lines of code HttpClient client = HttpClientBuilder.create().build(); HttpGet request = new HttpGet("http://localhost/<appln-folder-name>/method/domethod?data1=abc&data2=xyz"); HttpResponse response = client.execute(request); In this situation, the method that I posted send to a Web Server the 2 data. @Path("/domethod")...

How to wait for a response from a wpf mvvm popup

c#,wpf,popup,response,dialogresult
I've searched but cannot find an answer to this question, and maybe that means there is a better way to do what I'm attempting. In a WPF application, using MVVM design pattern: I've created a UserControl that is a box. This popup box has two options (buttons) on it, "Okay"...

waiting socket server response with java client

java,sockets,response
This client has to interact with a private server. I have to do this: send from client a block message "Block" request some xml data via persistent tcp send from client an unlock message "Unlock" The problem is that when I send command for receive the xml data, the shell...

alternative to through2-map in node.js [related to learnyounode]

javascript,node.js,stream,request,response
Problem i am solving: Write an HTTP server that receives only POST requests and converts incoming POST body characters to upper-case and returns it to the client. Your server should listen on the port provided by the first argument to your program. My Solution var http = require('http'); var map...

RestKit XML Mapping issue with nested elements

xml,restkit,response
I'm using RestKit .22, and having problem mapping XML response to entity. Everything works and I get 200OK, but objects arent mapped correctly. In XML response there is a root element "response", under it an array of "events". <response> <meta>...</meta> <events> <event>...// data that I'm after reflected in the entity....

Unexplained high response time on Heroku environment

ruby-on-rails,heroku,response,server,lag
I'm using a paid Heroku ($35/mo 2x web dyno, $50/mo silver postgresdb) plan for a small internal app with typically 1-2 concurrent users. Database snapshot size is less than 1MB. App is Rails 4.1. In the last two weeks, there's been a significant performance drop in production env, where Chrome...

Laravel 5 redirect to previous root after filters

laravel,redirect,laravel-5,response,middleware
I ran into simple problem but I still can't solve it. At the moment i got middleware which checks user status, if it's 0 middleware redirects user to choose status root. So how do i redirect user to route, after successfully picking status, where he got cought by middleware? My...

Jersey REST service not consuming JSON

rest,jersey,response,jersey-client
I have a REST service and client. I am trying to invoke this service to consume a JSON directly and convert it to the object I need. But it's not working. I am getting the following error: A message body reader for Java class com.a.b.c.D, and Java type class com.a.b.c.D,...

Get the value from a single line XML response

javascript,xml,asp-classic,response
I have the result of a web service call returned to my application. I need to get the result of the generated pdf name. Can anyone suggest a method of doing this in Classic Asp or Javascript. I've tried various methods of trying to get the value using xPath etc....

WSO2 ESB Tracking Request-Response

logging,request,wso2,response,wso2esb
I'm working on WSO2 ESB 4.8.1 By observing ESB HOME/repository/logs/wso2carbon.log i need to know the connection between one request and its relative response going through my proxy services. I tried following the MessageID property printed in the insequence and the out sequence of my proxies, but i realize, even if...

No response from second client socket

java,multithreading,sockets,response,runnable
I am working with Java sockets. I have a server socket and two client sockets. My problem is, that the first client socket submits its message to my server socket, and the message from the second client socket is not arriving at the server socket. That means, that for the...

Does response from requests.get() use the same memory or allocates new memory each time in python?

python,memory,request,response,allocation
I use dict_a['response'] = requests.get(given_url) to get data from some website with given frequency using requests modular. The returned response (requests.get(given_url)) is json object correponding to dictionaries, which is used later. Does response from requests.get(given_url) use the same memory or allocates new memory each time in python? If later is...

Spring Integration Async Gateway Response Handling

response,spring-integration,gateway
I need some hint how to solve a problem with Spring Integration. I have a Gateway interface. public interface OrderGateway { Future<Response> process(Request value); } I send a request message via the gateway. The ValidationService should check if the data is correct. If yes it should forward the message to...

Send response to a new window from a postback?

asp.net,vb.net,pdf,response,postback
Example in my vb asp.net application On postback // ... do stuff Response.Clear() Response.Buffer = True Response.ContentType = "application/pdf" Response.OutputStream.Write(fileData, 0, fileData.Length) Response.End() I have tried multiple ways and google doesn't offer me to much on my searchers regarding using script document.forms[0].target = "_blank"; and other techniques like creating a...

PayPal charged, but payment response is “INVALID”

paypal,response,paypal-ipn,payment,invalidate
several of the webshops from our customers provide a checkout via PayPal. Actually we have the problem, that when we're forcing a checkout, we get the answer, that something went wrong. But if we check the PayPal Account, then we see, that the charging still has taken place. Now we're...