Search Results

Search found 5900 results on 236 pages for 'rest'.

Page 24/236 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • How to reduce latency of data sent through a REST api

    - by Sid
    I have an application which obtains data in JSON format from one of our other servers. The problem I am facing is, there is is significant delay when when requesting for this information. Since a lot of data is passed (approx 1000 records per request where each record is pretty huge) is there a way that compression would help reducing the speed. If so which compression scheme would you recommend. I read on another thread that they pattern of data also matters a lot on they type of compression that needs to be used. The pattern of data is consistent and resembles the following :desc=>some_description :url=>some_url :content=>some_content :score=>some_score :more_attributes=>more_data Can someone recommend a solution to how I could reduce this delay. They delay is approx 6-8 seconds. I'm using Ruby on Rails to develop this application and the server providing the data uses Python for the most part.

    Read the article

  • imagefill() turns rest of the area black

    - by Nidhinzz Own
    I'm using imagefill() for changing the background color if an image.But while doing so the other areas which are not to be affected, change its color to black. $image = imagecreatefrompng("sample.png"); $background = imagecolorallocate($image, 255, 0,0); imagefill($image, 0,0, $background); header("content-type: image/png"); imagepng($image,"sample.png"); This is my code.Can anyone tell me how this is happening ?

    Read the article

  • Appending to InnerHtml without rest of contents flicking

    - by centro
    I have a div element with some formatted images. On user request, I load additional images asynchronously, without postback, and append the result (formatted HTML for new images) to the div element using JavaScript: function onRequestComplete(result) { var images = document.getElementById('images'); images.InnerHtml += result; } All is okay, except that part when images in the panel loaded previously flicker after the HTML is appended. As far I understand, the panel is reconstructed, not just new HTML is appended to its bottom. So it isn't web 2.0 behavior. How can it be done without flicking? Thanks in advance.

    Read the article

  • Does GoDaddy supports RESTful services via WCF

    - by Amir Naor
    After deploying a WCF RESTful service that i created using the REST started kit, i got several errors that i managed to solve following this post: http://www.edoverip.com/edoverip/index.php/2009/01/30/running-wcf-on-godaddy Now i'm stuck with this error: IIS specified authentication schemes 'Basic, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used I saw that others got to this point without a solution. GoDaddy support dont know nothing. Is it possible at all? Are there any web hosting services that you know that support that?

    Read the article

  • WCF Global(.asax) Behavior

    - by Theofanis Pantelides
    Hi, I want to create a global option that when a REST call contains &format=json to output the response as a JSON string. If I enter the following String in my method it works: WebOperationContext.Current.OutgoingResponse.Format = WebMessageFormat.Json; However, if I add this line, anywhere in my Global.asax file, I get a nullException for Current Context: String format = ""; if (HttpContext.Current.Request.QueryString["format"] != null) format = HttpContext.Current.Request.QueryString["format"]; if (String.Equals("json", format, StringComparison.OrdinalIgnoreCase)) System.ServiceModel.Web.WebOperationContext.Current.OutgoingResponse.Format = System.ServiceModel.Web.WebMessageFormat.Json; The exception is triggered here: System.ServiceModel.Web.WebOperationContext.Current Anyone know how I can add this functionality globally (WCF)?

    Read the article

  • How to fix Jersey POST request parameters warning?

    - by Brabster
    I'm building a very simple REST API using Jersey, and I've got a warning in my log files that I'm not sure about. WARNING: A servlet POST request, to the URI http://myserver/mycontext/myapi/users/12345?action=delete, contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected. My webapp only has the Jersey servlet defined, mapped to /myapi/* How can I stop these warnings?

    Read the article

  • Amazon S3 Change file download name

    - by Daveo
    I have files stored on S3 with a GUID as the key name. I am using a pre signed URL to download as per S3 REST API I store the original file name in my own Database. When a user clicks to download a file from my web application I want to return their original file name, but currently all they get is a GUID. How can I achieve this? My web app is in salesforce so I do not have much control to do response.redirects all download the file to the web server then rename it due to governor limitations. Is there some HTML redirect, meta refresh, Javascript I can use? Is there some way to change the download file name for S3 (the only thing I can think of is coping the object to a new name, downloading it, then deleting it). I want to avoid creating a bucket per user as we will have a lot of users and still no guarantee each file with in each bucket will have a unique name Any other solutions?

    Read the article

  • Upload image with Photoshop scripting

    - by cosmorocket
    Is that possible to upload an image from Photoshop (for example, an open image exported to jpeg) to some web place - REST service, FTP etc by using scripting features of Photoshop? For example - I have an image open in Photoshop and then execute some special script that sends an exported version of it to some place over the web. I saw something like this but it uses an automatically generated batch file that executes ftp command on Windows. I would like to use something more beautiful if it's possible. Or may be there are some info to know how to make a simple plugin for just this task. Thanks.

    Read the article

  • Facebook PHP API Calls

    - by Daniel Hertz
    Hello, So I simply want to add my current facebook status to my personal website. I have been looking at tutorials and other posts about fb and fb connect, but I am still confused. Is there anyway to do this with simple REST calls? Like twitter or flickr? From what I understand I dont need FB connect because I am just getting my own status and do not need to get any info from other visitors. Any know how to do this?

    Read the article

  • Best/Most Comprehensive API for Stocks/Financial Data

    - by Wilco
    What is the most recommended free/public API for accessing financial market stats and stock quotes (preferrably real-time quotes)? I'm not too picky about how it's exposed (SOAP, REST, some proprietary XML setup, etc.), as long as it's got some decent documentation. I'm planning to build a simple web dashboard in PHP with some basic data (basically a quick-n-dirty homepage), but may want to grow it into a full blown web app eventually. Any thoughts? As I find some, I'll post a list here (feel free to comment if you've used any of them before): Free opentick (soprano) Not Free XigniteRealTime

    Read the article

  • Is there a Java API for creating a XHTML document?

    - by Bedwyr Humphreys
    I want to provide a simple XHTML representation of each of the resources in a REST web service. At the moment i'm using a StringBuilder to generate these which is both tedious and error prone. I don't see these changing after I publish the service but the process of coding each is a bit painful. Is there a XHTML document writer api? Should I just use an XML writer? Which one? Should I just roll my own basic HTML document class - doctype is the same each time, i just need to set the title, metatags and body content, most of which (but not all content) is already in HTML for the GETs. Or should I just use StringBuilder and stop whining? ;) Thanks.

    Read the article

  • Facebook status.get API throws 500 HTTP status code

    - by Charles Prakash Dasari
    I have an APP that calls Facebook status.get method via the REST server - restserver.php using session key method. This app works fine for most of the users, but for one user I consistently receive HTTP 500 status code. Since this doesn't have any specific Facebook error message, it is almost impossible for me to debug this. Anyone faced a similar problem? What could be wrong with this user account? I checked the privacy options that I could think of and they look fine. Also, for the same user, I can use friends.get method without any problem. EDIT: I tried in Facebook forums as well, but it was of no use. Any pointers in the direction towards debugging/troubleshooting this problem are also appreciated.

    Read the article

  • Using HTTP Vary header to decide on a strategy to process a request

    - by Jacques René Mesrine
    I have a specific REST endpoint that creates a topic in a forum; but I want to apply different strategies when processing the request. e.g. If client A makes the call, perform moderation. if client B makes the call, do something else. The easiest would be to add a query param for differentiation: POST /resource?from=xyz Another brilliant idea is to use the Vary HTTP header. POST /resource Vary: xyz Any problems with this approach ?

    Read the article

  • How to get this XmlAttribute

    - by user328738
    From the MusicBrainz REST service, I get the following xml: <artist-list offset="0" count="59"> <artist type="Person" id="xxxxx" ext:score="100"> ... Using WCF and XmlSerializationFormat, I'm able to get the type and id attributes... but How do I get the "ext:score" one? This works: public class Artist { [XmlAttribute("id")] public string ID { get; set; } [XmlAttribute("type")] public ArtistType Type { get; set; } But this doesnt: [XmlAttribute("ext:score")] public string Score { get; set; } It produces a serialization exception. I've also tried just using "score", but it doesn't work. Any help?

    Read the article

  • RESTful Design: Paging Collections

    - by Koen Bok
    I am designing a REST api that needs paging (per x) enforces from the server side. What would be the right way to page through any collection of resources: Option 1: GET /resource/page/<pagenr> GET /resource/tags/<tag1>,<tag2>/page/<pagenr> GET /resource/search/<query>/page/<pagenr> Option 2: GET /resource/?page=<pagenr> GET /resource/tags/<tag1>,<tag2>?page=<pagenr> GET /resource/search/<query>?page=<pagenr> If 1, what should I do with GET /resource? Redirect to /resource/page/0, reply with some error or reply with the exact same as /resource/page/0 without redirecting?

    Read the article

  • how to send JSON data with server error response code 500

    - by kapil.israni
    I wanted to know if theres a way to send a JSON data along with HTTP response code 500. Basically I want my rest client to know that there is some error on the backend and along with it send a JSON error data structure like this. {"error" : [ {"code": "1001", "desc": "Some error description"}, {"code": "1002", "desc": "Some other error description"} ] } This is using the following java stack = Java 6/JAX-RS/Jersey/Tomcat If not, then is there a way to send a custom response code along with JSON data. Basically looking from JAX-RS API it looks that you can only send JSON data along with 200 OK?? Any thoughts?? I am guessing RESTEasy would be the same, right??

    Read the article

  • RESTful web services - best way to return result of an operation?

    - by saille
    I am designing a RESTful API and I would like to know what the most RESTful way is to return details about an operation. E.g. an operation on a resource occurs when some data is POSTed to a URL. HTTP status codes will indicate either success or failure for the operation. But apart from success/failure I need to indicate some other info to the client, such as an ID number. So my question is, should the ID number be returned in an XML document in the response content, or should it be returned in some custom HTTP header fields? Which is more in line with the principles of REST? Or am I free to choose.

    Read the article

  • Grails: JSONP callback without id and class in JSON file

    - by Klaas
    Hi, I am working on a REST based interface where people get a json file. The client needs to access the file from another Domain. I use jsonp which works so far. My problem is the rendering in Grails. At the moment I use the 'as JSON' to marshalling the object: render "${params.jsoncallback}(${user as JSON})" The Json file getting to the client inclused all attributes, incluing the id and class, which I do not want to have in there. In case it is not jsonp, I do it this way, which works great: render(contentType:'text/json'){ userName user.userName userImage user.userImage : : } So how do I get the id and class attributes out of the json when rendering "user as JSON"? Any idea? best regards, Klaas

    Read the article

  • Passing parameters to web service method in c#

    - by wafa.cs1
    Hello I'm developing an android application .. which will send location data to a web service to store in the server database. In Java: I've used REST protocol so the URI is: HttpPost request = new HttpPost("http://trafficmapsa.com/GService.asmx/GPSdata? lon="+Lon+"&Lat="+Lat+"&speed="+speed); In Asp.net (c#) web service will be: [WebMethod] public CountryName GPSdata(Double Lon, Double Lat, Double speed) { after passing the data from android ..nothing return in back .. and there is no data in the database!! Is there any library missing in the CS file!! I cannot figure out what is the problem.

    Read the article

  • Build a JavaScript wrapper for a rails-generated XML API?

    - by Thor Thurn
    I am working with a large website written in Ruby on Rails. Thanks to the support for REST in Rails 2, the site's business logic is all accessible via a consistent XML API. Now I want to be able to easily write one or more JavaScript frontends to the site that interact with the generated Rails XML API. Ideally, an automated wrapper for the API could be created in JavaScript, since this would minimize the effort required in writing XML processing code for the more than 500 API functions. How, then, can I automatically generate a wrapper around a given XML API in JavaScript so that it's more pleasant to work with? I've worked with solutions of this nature for Java that generate classes and methods to wrap an API, so my current thinking is that I want something of that nature for JavaScript. I'd be open to an alternative take on the problem, though.

    Read the article

  • restful way for deleting a bunch of items

    - by keisimone
    In wiki article for REST it is indicated that if you use http://example.com/resources DELETE, that means you are deleting the entire collection. If you use http://example.com/resources/7HOU57Y DELETE, that means you are deleting that element. I am doing a WEBSITE, note NOT WEB SERVICE. I have a list that has 1 checkbox for each item on the list. Once i select multiple items for deletion, i will allow users to press a button called DELETE SELECTION. If user presses the button, a js dialog box will popup asking user to confirm the deletion. if user confirms, all the items are deleted. So how should i cater for deleting multiple items in a RESTFUL way? NOTE, currently for DELETE in a webpage, what i do is i use FORM tag with POST as action but include a _method with the value DELETE since this is what was indicated by others in SO on how to do RESTful delete for webpage.

    Read the article

  • F5 irule with RESTful services

    - by Kyle Hayes
    I'm trying to come up with a rule on our F5 to direct traffic to our Tomcat server appropriately. We are deploying separate WAR files for each RESTful service. So, we would like to have the following URIs as an example: /services/quiz/01234/ /services/user/54321/ Where 'quiz' and 'user' are quiz.war and user.war respectively. We want to direct the traffic at the F5 level for /services/ to be the root and the rest of the URI to be directed to the Tomcat server. How do we accomplish this? Edit The browser url for a resource would look like http://www.domain.com/services/quiz/01234/ I want BIG-IP to send the request to tomcat as http://tomcatserver:8080/quiz/01234/ so basically remove /services and append everything after it to the tomcat domain. I would think this would be an easy regex, right?

    Read the article

  • How to set response header in JAX-RS so that user sees download popup for Excel?

    - by masato-san
    I wrote code that generate Excel file using REST JAX-RS and I confirmed that the generated Excel file is in GlassFish server directory. But my goal is when user click on the button (which generate Excel .xls), I want download popup to show up asking user whether to save or open the .xls file just like any other web services doing for downloading any type of files. According to my search, the step is: generate Excel .xls (DONE) write the excel to stream in JAX-RS file, set response header to something like, String fileName = "Blah_Report.xls"; response.setHeader("Content-Disposition", "attachment; filename=" + fileName); My question is I'm doing all of this in JAX-RS file and I don't have HttpServletResponse object available. According to the answer from Add Response Header to JAX-RS Webservice He says: You can inject a reference to the actual HttpServletResponse via the @Context annotation in your webservice and use addHeader() etc. to add your header. I can't really figure what exactly that means without sample code..

    Read the article

  • JAX-RS implementation of link/element expansion?

    - by Jimmy
    While reading documentation of Google Data API and Atlassian REST API, I found interesting functionality - link (or title, element expansion) - http://bit.ly/i3rKMw. I would like to implement this functionality in my Java project of web service server for our IS, but I can't find any proper solution or advices for implementation. My project is quite big with many services so I need some robust and most automated solution. I was thinking about how to implement it like an extension for RESTEasy and JAXB, but it seems to be very complicated. Do you know some opensource projects which implements this functionality or any advices which could help me?

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >