Search Results

Search found 15591 results on 624 pages for 'request pipeline'.

Page 34/624 | < Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >

  • jQuery on click event send POST request

    - by Peterim
    Trying to send POST request on click event using jQuery with no luck. Here is what I use: <script type="text/javascript"> $('#taxi_update').click( $.ajax({ 'type':'POST', 'data':'id=17446&chru=0', 'success':function() { ... }, 'error':function(){ ... }, 'url':'/url/', 'cache':false }) ); </script> <a href="#" id="taxi_update">update</a> Unfortunately it doesn't send any POST request. Any suggestions what could be wrong with this?

    Read the article

  • I can't change HTTP request header Content-Type value using jQuery

    - by Matt
    Hi I tried to override HTTP request header content by using jQuery's AJAX function. It looks like this $.ajax({ type : "POST", url : url, data : data, contentType: "application/x-www-form-urlencoded;charset=big5", beforeSend: function(xhr) { xhr.setRequestHeader("Accept-Charset","big5"); xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=big5"); }, success: function(rs) { target.html(rs); } }); Content-Type header is default to "application/x-www-form-urlencoded; charset=UTF-8", but it obviously I can't override its value no matter I use 'contentType' or 'beforeSend' approaches. Could anyone adivse me a hint that how do I or can I change the HTTP request's content-type value? thanks a lot. btw, is there any good documentation that I can study JavaScript's XMLHttpRequest's encoding handling?

    Read the article

  • Is webserver bandwith the entire HTTP Request/Responce?

    - by Lienau
    Just a quick question. I'm making a web application where C++ communicates with a php script over HTTP Requests/Response. The data being set back and forth is quite small ~36 bytes. But I plan to have many computers connected, contacting the server quite often. I did the math, and I could potentially have gigabytes of data transfer a month. This isn't too much of problem, but it would be if the bandwidth included the request/response headers the request size would be about ~560 bytes. That's about 16x more bandwidth than I was planning... That would be a lot. If if any one knew how host determine bandwidth and could share, that'd be great. Thanks.

    Read the article

  • [Rails] HTTP Get Request

    - by Karl
    I've been trying to get Rails to play with the new Facebook Graph API. After I get the authorization "code", I need to send another request which returns the access token in JSON form. It seems to work fine, however I want to fetch the access token JSON without redirecting the user. I'm attempting to use Net::HTTP.get, but I'm not sure how to use it to get a request body, or even if it's the right thing to use to begin with. Can anyone give an example of performing an HTTP GET?

    Read the article

  • failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request

    - by muralikalpana
    I am accessing images from another website. I am getting "failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request " error when copying 'some(not all)' images. here is my code. $img=$_GET['img']; //another website url $file=$img; function getFileextension($file) { return end(explode(".", $file)); } $fileext=getFileextension($file); if($fileext=='jpg' || $fileext=='gif' || $fileext=='jpeg' || $fileext=='png' || $fileext=='x-png' || $fileext=='pjpeg'){ if($img!=''){ $rand_variable1=rand(10000,100000); $node_online_name1=$rand_variable1."image.".$fileext; $s=copy($img,"images/".$node_online_name1); }

    Read the article

  • Determine if PowerShell function is running as part of a pipeline?

    - by Richard Cook
    Can a PowerShell function determine if it is being run as part of a pipeline? I have a function which populates an array with instances of FileInfo which I would like to "yield" to the pipeline if the function is being run this way or produce some pretty output if the function is being invoked by itself from the command line. function Do-Something { $file_infos = @() # Populate $file_infos with FileInfo instances... if (INVOKED_IN_PIPELINE) { return $file_infos } else { foreach ($file_info in $file_infos) { write-host -foregroundcolor yellow $file_info.fullname } } } Basically, I'm trying to figure out how to implement INVOKED_IN_PIPELINE. If it is run in a pipeline (e.g. Do-Something | format-table fullname), I would simply yield the array, but if run directly (e.g. Do-Something), it would simply pretty-print the output. Is there a way to do this? If there is a more "idiomatic" way to achieve this kind of thing, I would also be interested to know.

    Read the article

  • php code for geeting paramenter and image from the post request

    - by abdulsamad
    Hi all can any one guide me how to get parameter specially image from the given post request. --0xKhTmLbOuNdArY Content-Disposition: form-data; name="source" lighttable --0xKhTmLbOuNdArY Content-Disposition: form-data; name="title" Google (The top search engine). --0xKhTmLbOuNdArY Content-Disposition: form-data; name="isbn" 9780077282073 --0xKhTmLbOuNdArY Content-Disposition: form-data; name="price" 5 --0xKhTmLbOuNdArY Content-Disposition: form-data; name="condition" Execlent --0xKhTmLbOuNdArY Content-Disposition: form-data; name="media" Content-Type: image/jpg Content-Transfer-Encoding: binary ÿØÿà NoTE:: ÿØÿà is the image in that request.

    Read the article

  • jQuery ajax request to php, how to return plain text only

    - by jyoseph
    I am making an ajax request to a php page and I cannot for the life of me get it to just return plain text. $.ajax({ type: 'GET', url: '/shipping/test.php', cache: false, dataType: 'text', data: myData, success: function(data){ console.log(data) } }); in test.php I am including this script to get UPS rates. I am then calling the function with $rate = ups($dest_zip,$service,$weight,$length,$width,$height); I am doing echo $rate; at the bottom of test.php. When viewed in a browser shows the rate, that's great. But when I request the page via ajax I get a bunch of XML. Pastie here: http://pastie.org/1416142 My question is, how do I get it so I can just return the plain text string from the ajax call, where the result data will be a number? Edit, here's what I see in Firebug- Response tab: HTML tab:

    Read the article

  • Track each request to the website

    - by stacker
    I want to save each request to the website. In general I want to include the following information: User IP, The web site url. Response time, response success-failed status. Is it reasonable to collect the 1 and 2 in the same action? (like same HttpModule)? Do you know about any existing structure that I can follow that track every request/response-status to the website? The data need to be logged to sql server.

    Read the article

  • Forward web request for directory index ('/') to an index.htm page in JBoss 4.0.5

    - by The Pretender
    I am using JBoss 4.0.5.GA to run a set of java applications. One of them is a web frontend, using Spring 1.4. URL mappings are configured in a way that 'fake' pages from request URLs are mapped to controllers. That means that when someone requests /index.htm, there's no actual 'index.htm' on disk, and that request maps to a specific conroller which then renders a jsp view. So the problem is as follows: I need to tell JBoss to somehow forward all requests for directory indices to corresponding 'index.htm' URLs like so: / ? /index.htm; /news/ ? /news/index.htm; /foo/bar/baz/ ? /foo/bar/baz/index.htm and so on. I can't use Tomcat's welcome-file-list feature because it looks for those files on disk, while all 'index.htm's are fake and don't actually exist on disk.

    Read the article

  • Securing an ajax request

    - by asdasdsa
    i have a website that uses session cookies for security. it works fine and all, but any ajax requests right now are not secure. example being lets say a user is on a page. they can only get to this page if they are logged in with a session - so far so good. but now the ajax request they ask for is ajaxpages/somepage.php?somevar=something&anothervar=something if any other user decides to just go to that link themselves (without a session) they still get the same ajax output that was meant for logged in people. so obviously im going to have to pass session data across when i send an ajax request. anyone have any tips for the best way of doing this? ive never done this before and would rather use trusted methods than make up my own.

    Read the article

  • How to add chain of certificate in spring ws client request

    - by hudi
    I have simply spring ws client which sending request to some url: @SuppressWarnings("unchecked") private JAXBElement<O> sendSyncSoapRequest(final JAXBElement<I> req, final String iszrUrl) { if (iszrUrl != null) { return (JAXBElement<O>) this.wsTemplate.marshalSendAndReceive(iszrUrl, req); } else { return (JAXBElement<O>) this.wsTemplate.marshalSendAndReceive(req); } } Now I need attach chain of certificate to the soap request. How should I do this ? Please help

    Read the article

  • RequireHttpsAttribute and Encrypted Request Data

    - by goatshepard
    I have a controller action that is accepting sensitive data. public ActionResult TakeSensitiveData(SensitiveData data){ data.SaveSomewhere(); } To ensure the data is secure I want to be certain requests are made using HTTPS (SSLv3, TLS 1). One of the approaches I've considered using was the RequireHttpsAttribute on my action: [RequireHttps] public ActionResult TakeSensitiveData(SensitiveData data){ data.SaveSomewhere(); } However, upon testing this I fiddler revealed that an HTTP request made to the action is 302 redirected to HTTPS. My question is this: If I've made a request that is 302 redirected to HTTPS haven't I already sent the sensitive data over HTTP before the redirect?

    Read the article

  • making ajax request to another server

    - by santhosh
    Hi, I had a ajax sample code from W3Schools, where If i request ajax call to remote server the request getting fails. function loadXMLDoc() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("myDiv").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","http://www.google.com",true); xmlhttp.send(); } How to solve this..?

    Read the article

  • jQuery get request against Sinatra does not get text

    - by jerhinesmith
    I have a very simple sinatra site that I'm trying to access via ajax through jQuery. To keep things incredibly simple, this code snippet: get '/behavior_count' do "60" end which returns "60" in the browser, shows up as an empty string when attempting to access the site via $.get in jQuery. The strange part is in Firebug, while the Response is empty, the HTTP header correctly describes Content-Length as 2, and I can see the request show up on the server. Is there something specific to Sinatra that isn't returning my data, or am I not using jQuery correctly? If it helps, I also tried this code: get '/behavior_count' do content_type 'text/plain', :charset => 'utf-8' "60" end and my jQuery looks like $.get('http://mysite:4567/behavior_count'); // Ignore the response, but // watch the request in firebug Any ideas?

    Read the article

  • Retrieve web user's Identity outside of request scope

    - by Kendrick
    I have an ASP.NET app that logs Audit reports using nHibernate's IPreUpdateListener. In order to set the current user in the Listener events, I was using System.Security.Principal.WindowsIdentity.GetCurrent(). This works fine when debugging on my machine, but when I move it to the staging server, I'm getting the ASP.NET process credentials, not the requesting user. In the ASP.NET page, I can use Request.LogonUserIdentity (which works fine since I'm using integrated authentication), but how do I reference this user directly without having to pass it directly to my event? I don't want to have to pass this info through the pipeline because it really doesn't belong in the intermediate events/calls.

    Read the article

  • Can not make a request to google map

    - by Eme Emertana
    Hi I am making a restful request to google map, but I run into following error; java.io.IOException: Server returned HTTP response code: 400 for URL: http://maps.googleapis.com/maps/api/distancematrix/xml?origins=Washington, DC USA&destinations=Los+Angeles+CA+USA&mode=driving&sensor=false at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436) at java.net.URLConnection.getContent(URLConnection.java:688) I believe its making a correct connection as I can get the correct response by copying the above URL into my browser, I am wondering why I am getting 400 error code in my console and I dont get the correct response when java is sending the request.

    Read the article

  • Lighttpd + fastcgi + python (for django) slow on first request

    - by EagleOne
    I'm having a problem with a django website I host with lighttpd + fastcgi. It works great but it seems that the first request always takes up to 3seconds. Subsequent requests are much faster (<1s). I activated access logs in lighttpd in order to track the issue. But I'm kind of stuck. Here are logs where I 'lose' 4s (from 10:04:17 to 10:04:21): 2012-12-01 10:04:17: (mod_fastcgi.c.3636) handling it in mod_fastcgi 2012-12-01 10:04:17: (response.c.470) -- before doc_root 2012-12-01 10:04:17: (response.c.471) Doc-Root : /var/www 2012-12-01 10:04:17: (response.c.472) Rel-Path : /finderauto.fcgi 2012-12-01 10:04:17: (response.c.473) Path : 2012-12-01 10:04:17: (response.c.521) -- after doc_root 2012-12-01 10:04:17: (response.c.522) Doc-Root : /var/www 2012-12-01 10:04:17: (response.c.523) Rel-Path : /finderauto.fcgi 2012-12-01 10:04:17: (response.c.524) Path : /var/www/finderauto.fcgi 2012-12-01 10:04:17: (response.c.541) -- logical -> physical 2012-12-01 10:04:17: (response.c.542) Doc-Root : /var/www 2012-12-01 10:04:17: (response.c.543) Rel-Path : /finderauto.fcgi 2012-12-01 10:04:17: (response.c.544) Path : /var/www/finderauto.fcgi 2012-12-01 10:04:21: (response.c.128) Response-Header: HTTP/1.1 200 OK Last-Modified: Sat, 01 Dec 2012 09:04:21 GMT Expires: Sat, 01 Dec 2012 09:14:21 GMT Content-Type: text/html; charset=utf-8 Cache-Control: max-age=600 Transfer-Encoding: chunked Date: Sat, 01 Dec 2012 09:04:21 GMT Server: lighttpd/1.4.28 I guess that if there is a problem, it's whith my configuration. So here is the way I launch my django app: python manage.py runfcgi method=threaded host=127.0.0.1 port=3033 And here is my lighttpd conf: server.modules = ( "mod_access", "mod_alias", "mod_compress", "mod_redirect", "mod_rewrite", "mod_fastcgi", "mod_accesslog", ) server.document-root = "/var/www" server.upload-dirs = ( "/var/cache/lighttpd/uploads" ) server.errorlog = "/var/log/lighttpd/error.log" server.pid-file = "/var/run/lighttpd.pid" server.username = "www-data" server.groupname = "www-data" accesslog.filename = "/var/log/lighttpd/access.log" debug.log-request-header = "enable" debug.log-response-header = "enable" debug.log-file-not-found = "enable" debug.log-request-handling = "enable" debug.log-timeouts = "enable" debug.log-ssl-noise = "enable" debug.log-condition-cache-handling = "enable" debug.log-condition-handling = "enable" fastcgi.server = ( "/finderauto.fcgi" => ( "main" => ( # Use host / port instead of socket for TCP fastcgi "host" => "127.0.0.1", "port" => 3033, #"socket" => "/home/finderadmin/finderauto.sock", "check-local" => "disable", "fix-root-scriptname" => "enable", ) ), ) alias.url = ( "/media" => "/home/user/django/contrib/admin/media/", ) url.rewrite-once = ( "^(/media.*)$" => "$1", "^/favicon\.ico$" => "/media/favicon.ico", "^(/.*)$" => "/finderauto.fcgi$1", ) index-file.names = ( "index.php", "index.html", "index.htm", "default.htm", " index.lighttpd.html" ) url.access-deny = ( "~", ".inc" ) static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) ## Use ipv6 if available #include_shell "/usr/share/lighttpd/use-ipv6.pl" dir-listing.encoding = "utf-8" server.dir-listing = "enable" compress.cache-dir = "/var/cache/lighttpd/compress/" compress.filetype = ( "application/x-javascript", "text/css", "text/html", "text/plain" ) include_shell "/usr/share/lighttpd/create-mime.assign.pl" include_shell "/usr/share/lighttpd/include-conf-enabled.pl" If any of you could help me finding out where I lose these 3 or 4 s. I would much appreciate. Thanks in advance!

    Read the article

  • jQuery .ajax request failing

    - by user1644808
    I currently have a jQuery ajax request set up like this $(document).ready( function() { $.ajax({ url : "http://www.my-computer.com:51000/getJson", cache : false, dataType: "json", success : renderPage, error: handleError }) }); If I manually naviate to http://www.my-computer.com:51000/getJson, I see it returns a json string correctly, but with the above request, I always fall into "handleError" method, with textStatus "error" and not much helpful information. Can anyone help? Thanks! EDIT: sorry about the my-computer domain. this stackoverflow submission won't let me input localhost, so I put in an arbitrary domain instead. I've tried firebug, but had no luck in getting the json back.

    Read the article

  • Oauth2 External Browser Request - App Launches, Credentials received, Browser Not Updated

    - by Michael Drozdowski
    I'm using an external browser request to authenticate myself with the SoundCloudAPI in OSX. My app launches, and has a button that opens an external browser window to authenticate against SoundCloud. When I click "connect" in the new window, I get a "External Protocol Request" that is consistent with my custom launch URI scheme. Clicking this loads the app, and it gets the correct credentials. The trouble is, the browser window never changes - it simply says that it's connecting forever. There is no "connection confirmed" alert coming from SoundCloud. I know I'm logged in because I can make the correct calls to the API to get things such as my username. Why isn't the browser confirming the connection or dismissing? The same thing happens if I load the authentication in an internal WebView in the app.

    Read the article

  • postback __EVENTTARGET ID in Page.Request.Form has $ not _ in ASP.NET

    - by Industry86
    I am using the ToolkitScriptManager from the Ajax tool kit and I am having a problem finding my button's ID. My ID's on my controls come back with $ symbols instead of _ symbols, like the following: Grid$ctl06$insertButton This obviously causes problems when attempting to find the control from the Page.Request.Form keys. I cannot seem to find the determining factor that would cause this. Now, I know this is the name and in my source I see that the ID is with the _, so why is the Page.Request.Form showing up with the $ symbol instead? Anybody encounter this before?

    Read the article

< Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >