Search Results

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

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

  • bad request error 400 while using python requests.post function

    - by Toussah
    I'm trying to make a simple post request via the requests library of Python and I get a bad request error (400) while my url is supposedly correct since I can use it to perform a get. I'm very new in REST requests, I read many tutorials and documentation but I guess there are still things I don't get so my error could be basic. Maybe a lack of understanding on the type of url I'm supposed to send via POST. Here my code : import requests v_username = "username" v_password = "password" v_headers = {'content-type':'application/rdf+xml'} url = 'https://my.url' params = {'param': 'val_param'} payload = {'data': 'my_data'} r = requests.post(url, params = params, auth=(v_username, v_password), data=payload, headers=v_headers, verify=False) print r I used the example of the requests documentation.

    Read the article

  • TinyMCE not working in http request xhr ajax generated page

    - by user982853
    So i I have a page that contains links that call an httpRequest. The request calls a php file that grabs data from mysql and pre populates a form which is then returned to the browser/webpage. My problem is that when the page is returned to the browser via the httpRequest/ajax the text area does not display the tinymce editor, it just displays a normal text area. It looks like my request and ajax is working fine the text area just doesn't have the tinycme editor on it. When i don't use ajax it works fine but when i put it in a separate file and call it via ajax it doesn't bring in the tinymce editor. Does anyone know how to fix this problem so that my ajax generated page displays the text area with the tinymce editor. Thank you.

    Read the article

  • Ruby Oauth File upload/Multipart POST request

    - by Jonas Söderström
    Hi I've been looking at this for a couple of hours now and haven't found a solution. Is there a way to upload a file using OAuth-Ruby? When I send a normal request, everything works but adding a file as a parameter makes the signature invalid. Example: @access_token.post("http://.../imageresource", {:name=>"awesome cat"}) works great but gives me: <error> <message>images/POST: Request has neither file data nor a fileUrl from which to download data</message> </error> Any thoughts on this? Thanks,

    Read the article

  • Qooxdoo REST JSON request problem - unexpected token and then timeout

    - by freiksenet
    Hello! I am learning Qooxdoo framework and I am trying to make it work with a small Django web service. Django webservice just returns JSON data like this: { "name": "Football", "description": "The most popular sport." } Then I use the following code to query that url: var req = new qx.io.remote.Request(url, "GET", "application/json"); req.toggleCrossDomain(); req.addListener("completed", function(e) { alert(e.getContent()); }); req.send(); Unfortunately when I execute the code I get unexpected token error and then request timeouts. Uncaught SyntaxError: Unexpected token : Native.js:91013011 qx.io.remote.RequestQueue[246]: Timeout: transport 248 Native.js:91013011 qx.io.remote.RequestQueue[246]: 5036ms > 5000ms Native.js:91013013 qx.io.remote.Exchange[248]: Timeout: implementation 249 JSLint reports that this is a valid JSON, so I wonder why Qooxdoo doesn't parse it correctly.

    Read the article

  • Determining full XHR request URL on a Google Chrome XHR Breakpoint

    - by DanH
    I am initiating a jQuery ajax ($.ajax) post, within the Google Chrome browser. I have setup a XHR breakpoint in the "XHR Breakpoints" section of the "Scripts" tab within the Developer Tools. The criteria of the breakpoint is "get" ie. I want the debugger to break on all XHR requests which contain the word "get" in them (somePage.asmx/getListOfAnimals) is an example. The breakpoint is being correctly hit, however I am unable to determine what the exact URL that is being requested. I realize I can remove the breakpoint and see what URL is being requested from the "Network" tab, but I want to know this at the time the breakpoint is hit. I have tried stepping through the XHR request once it has been hit in Chrome, but I must be missing a Javascript object/property which contains the fully requested URL. Google Chrome has detected that the XHR requested URL contains "get" but how do I get to this URL from within the debug session before the request is made?

    Read the article

  • Serializing an object into the body of a WCF request using webHttpBinding

    - by Bert
    I have a WCF service exposed with a webHttpBinding endpoint. [OperationContract(IsOneWay = true)] [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "/?action=DoSomething&v1={value1}&v2={value2}")] void DoSomething(string value1, string value2, MySimpleObject value3); In theory, if I call this, the first two parameters (value1 & value 2) are taken from the Uri and the final one (value3) should be deserialized from the body of the request. Assuming I am using Json as the RequestFormat, what is the best way of serialising an instance of MySimpleObject into the body of the request before I send it ? This, for instance, does not seem to work : HttpWebRequest sendRequest = (HttpWebRequest)WebRequest.Create(url); sendRequest.ContentType = "application/json"; sendRequest.Method = "POST"; using (var sendRequestStream = sendRequest.GetRequestStream()) { DataContractJsonSerializer jsonSerializer = new DataContractJsonSerializer(typeof(MySimpleObject)); jsonSerializer.WriteObject(sendRequestStream, obj); sendRequestStream.Close(); } sendRequest.GetResponse().Close();

    Read the article

  • How to send JSON request to service with parameters in Objective-C

    - by user1323884
    I'm creating a iPhone app, and im trying to figure out how to create a JSON request to the webservice that contains parameters. In Java this would look like this HashMap<String, String> headers = new HashMap<String, String>(); JSONObject json = new JSONObject(); json.put("nid", null); json.put("vocab", null); json.put("inturl", testoverview); json.put("mail", username); // [email protected] json.put("md5pw", password); // donkeykong headers.put("X-FBR-App", json.toString()); The header has to contain a JSON object and "X-FBR-App" before the service recognizes the request. How would this be implemented in Objective-C ?

    Read the article

  • [PHP] DOMDocument load on a page returning 400 Bad Request status

    - by PeteWilliams
    Hiya, I'm trying to use the Last.fm API for an application I'm creating, but am having some problems with validation. If an API request gives an error it returns a code and message in the response XML like this: <lfm status="failed"> <error code="6">No user with that name</error> </lfm> However, the request also returns an HTTP status of 400 (or in some cases 403) which DOMDocument considers an error and so then refuses to parse the XML. Is there any way round this, so that I can retrieve the error code and message? Thanks Pete

    Read the article

  • Bind multiple request parameters to one object in Spring 3

    - by Max
    Hi, I can't figure out a way to bind several arguments and headers to one request parameter using annotations in Spring 3. For example, let's say I'm getting this request: Headers: Content-type: text/plain; POST Body: Name: Max Now I want it all to mysteriously bind to this object: class NameInfo { String name; } Using some code like this: String getName() { if ("text/plain".equals(headers.get("content-type"))) { return body.get("name"); } else if ("xml".equals(headers.get("content-type")) { return parseXml(body).get("name"); } else ... } So that in the end I would be able to use: @RequestMapping(method = RequestMethod.POST) void processName(@RequestAttribute NameInfo name) { ... } Is there a way to achieve something similar to what I need? Thanks in advance.

    Read the article

  • Weird stack trace in exception "The incoming request does not match any route"

    - by Tassadaque
    i have published asp.net mvc application on iis 6 on the server(windows server 2003) from local machine. On server i have set the default page to default.aspx. but when i try to browse the site on server, it gives me exception "The incoming request does not match any route" One thing i noticed is that. Stack trace on line 5 is shown below. it has one weird thing that exception is still pointing to my local machine path [HttpException (0x80004005): The incoming request does not match any route.] System.Web.Routing.UrlRoutingHandler.ProcessRequest(HttpContextBase httpContext) +15589 System.Web.Routing.UrlRoutingHandler.ProcessRequest(HttpContext httpContext) +40 System.Web.Routing.UrlRoutingHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context) +7 **UserManagement._Default.Page_Load(Object sender, EventArgs e) in D:\Evoletpublishnew\UserManagement\UserManagement\Default.aspx.cs:18** System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

    Read the article

  • Django admin interface upload failing on request data read error

    - by Jake
    Hi All, This is an updated version of an old question I asked. I've now done a lot more testing, plus the old question got hijacked. I'm getting a request data read error when trying to upload files to the Django admin interface. Files under about 150k work, but bigger files always fail and almost always at around 192k (that's 3 chunks) completed, sometimes at around 160k. The Exception I get is below. File "/usr/lib/python2.4/site-packages/django/http/multipartparser.py", line 405, in read return self._file.read(num_bytes) IOError: request data read error I've tried Chrome and Firefox on Windows and Firefox on Mac - Same results. I can upload to other sites so I don't think it's my connection. I'm running python 2.4, django 1.1, mod_wsgi, on CentOS (a media temple DV server) Locally it's fine (Django development server) Everything I've found on this issue says it's a mod_python issue and that changing to mod_wsgi will fix it, but I am running mod_wsgi. Can anyone help?

    Read the article

  • Firefox redirect response on xhr request

    - by Bogdan Gusiev
    Suppose we have the xhr 'POST' request that returns 'redirect' status code. In that case browser is sending additional xhr 'GET' by the given URL. I am not sure who is doing that call chain: browser itself or js library(using MooTools). The problem is that the second 'GET' request is not recognized as xhr by the server: It doesn't have "X-Requested-With" header contains "XMLHttpRequest" The problem appears only on Firefox, but not on Webkit. So, believe it is not related to js library bug. Does anyone have ideas how to fix it?

    Read the article

  • After HTTP GET request, the resulting string is cut-off - content has been consumed

    - by Jayomat
    hi all, I'm making a http get request like this: try { HttpClient client = new DefaultHttpClient(); String getURL = "http://busspur02.aseag.de/bs.exe?SID=5FC39&ScreenX=1440&ScreenY=900&CMD=CR&Karten=true&DatumT="+day+"&DatumM="+month+"&DatumJ="+year+"&ZeitH="+hour+"&ZeitM="+min+"&Intervall=60&Suchen=(S)uchen&GT0=Aachen&T0=H&HT0="+start_from+"&GT1=Aachen&T0=H&HT1="+destination+""; HttpGet get = new HttpGet(getURL); HttpResponse responseGet = client.execute(get); HttpEntity resEntityGet = responseGet.getEntity(); if (resEntityGet != null) { //do something with the response Log.i("GET RESPONSE",EntityUtils.toString(resEntityGet)); } ........ It all works well... the only problem: the output from Log.i is cut-off... It's not the complete html page. If I make the same request in a browser, I get 3x the output in opposition to making the request in the emulator and using the above code.... what's wrong? ERROR: 04-30 14:01:01.287: WARN/System.err(1088): java.lang.IllegalStateException: Content has been consumed 04-30 14:01:01.297: WARN/System.err(1088): at org.apache.http.entity.BasicHttpEntity.getContent(BasicHttpEntity.java:84) 04-30 14:01:01.297: WARN/System.err(1088): at org.apache.http.conn.BasicManagedEntity.getContent(BasicManagedEntity.java:100) 04-30 14:01:01.307: WARN/System.err(1088): at org.apache.http.util.EntityUtils.toString(EntityUtils.java:112) 04-30 14:01:01.307: WARN/System.err(1088): at org.apache.http.util.EntityUtils.toString(EntityUtils.java:146) 04-30 14:01:01.307: WARN/System.err(1088): at mjb.project.AVV.ParseHTML.start(ParseHTML.java:177) 04-30 14:01:01.307: WARN/System.err(1088): at mjb.project.AVV.ParseHTML.onCreate(ParseHTML.java:139) 04-30 14:01:01.307: WARN/System.err(1088): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 04-30 14:01:01.327: WARN/System.err(1088): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459) 04-30 14:01:01.327: WARN/System.err(1088): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512) 04-30 14:01:01.327: WARN/System.err(1088): at android.app.ActivityThread.access$2200(ActivityThread.java:119) 04-30 14:01:01.347: WARN/System.err(1088): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863) 04-30 14:01:01.347: WARN/System.err(1088): at android.os.Handler.dispatchMessage(Handler.java:99) 04-30 14:01:01.347: WARN/System.err(1088): at android.os.Looper.loop(Looper.java:123) 04-30 14:01:01.347: WARN/System.err(1088): at android.app.ActivityThread.main(ActivityThread.java:4363) 04-30 14:01:01.347: WARN/System.err(1088): at java.lang.reflect.Method.invokeNative(Native Method) 04-30 14:01:01.357: WARN/System.err(1088): at java.lang.reflect.Method.invoke(Method.java:521) 04-30 14:01:01.357: WARN/System.err(1088): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 04-30 14:01:01.357: WARN/System.err(1088): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 04-30 14:01:01.357: WARN/System.err(1088): at dalvik.system.NativeStart.main(Native Method )

    Read the article

  • [Java] Send cookie with http request problem

    - by nkr1pt
    I'm trying to get a certain cookie in a java client by creating a series of Http requests. It looks like I'm getting a valid cookie from the server but when I'm sending out a request to the fnal url with the seemingly valid cookie I should get some lines of xml in the response but the response is blank because the cookie isw rong or is invalidated because a session has closed or an other problem which I can't figure out. The cookie handed out by the server expires at the end of the session. It seems to me the cookie is valid because when I do the same calls in firefox, a similar cookie with the same name and starting with the 3 first same letters and of the same length is stored in firefox, also expiring at the end of the session. If I then make a request to the final url with only this particular cookie stored in firefox (removed all other cookies), the xml is nicely rendered on the page. Any ideas about what I am doing wrong in this piece of code? One other thing, when I use the value from the very similar cookie generated and strored in firefox in this piece of code, the last request does give xml feedback in the http response! // Validate url = new URL(URL_VALIDATE); conn = (HttpURLConnection) url.openConnection(); conn.setRequestProperty("Cookie", cookie); conn.connect(); String headerName = null; for (int i = 1; (headerName = conn.getHeaderFieldKey(i)) != null; i++) { if (headerName.equals("Set-Cookie")) { if (conn.getHeaderField(i).startsWith("JSESSIONID")) { cookie = conn.getHeaderField(i).substring(0, conn.getHeaderField(i).indexOf(";")).trim(); } } } // Get the XML url = new URL(URL_XML_TOTALS); conn = (HttpURLConnection) url.openConnection(); conn.setRequestProperty("Cookie", cookie); conn.connect(); // Get the response StringBuffer answer = new StringBuffer(); BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream())); String line; while ((line = reader.readLine()) != null) { answer.append(line); } reader.close(); //Output the response System.out.println(answer.toString())

    Read the article

  • Why are changes to coffeescript files not being compiled when my Rails 3.2.0 app is in development mode?

    - by ben
    Normally, any changes I make to .js.coffee files in my Rails 3.2.0 app in development mode take effect when I refresh the page. All of a sudden, this is not happening. If I do rake assets:precompile, then the changes are shown, but then if I do rake assets:clean they go back to not being shown. What is causing this? Edit: Restarting the server makes the changes show. Why isn't this happening automatically as before? Edit: Here is my development.rb Myapp::Application.configure do # Settings specified here will take precedence over those in config/application.rb # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false # Log error messages when you accidentally call methods on nil. config.whiny_nils = true # Show full error reports and disable caching config.consider_all_requests_local = true config.action_controller.perform_caching = false # Don't care if the mailer can't send config.action_mailer.raise_delivery_errors = false # Print deprecation notices to the Rails logger config.active_support.deprecation = :log # Only use best-standards-support built into browsers config.action_dispatch.best_standards_support = :builtin # Raise exception on mass assignment protection for Active Record models config.active_record.mass_assignment_sanitizer = :strict # Log the query plan for queries taking more than this (works # with SQLite, MySQL, and PostgreSQL) config.active_record.auto_explain_threshold_in_seconds = 0.5 # Do not compress assets config.assets.compress = false # Expands the lines which load the assets config.assets.debug = true config.action_mailer.default_url_options = { :host => 'localhost:3000' } config.log_level = :warn end

    Read the article

  • PHP - Zend Soap Request to .NET SOAP Server

    - by G0D
    Hello! I'd like a little bit of assistance here. I am trying to send a request to a .NET SOAP server from PHP with Zend. I have the WSDL file but it does not contain any header information. Though I have tried to add a custom header this does not seem to work and the worst is that the WSDL file itself does not seem to be "right"..... Here is the link: http://www.speedex.gr/getvoutrans/getvoutrans.asmx The WSDL can be found in the same link by adding ?WSDL My request is: GetVouTrans Thanx in advance!

    Read the article

  • Using java applet to send request with the client ip

    - by mike
    hi, i need to send a request to a website when a user submits their url, i tried using curl but it uses server ip which i dont want i have seen a website that is doing a similar job by using applet, users need to open a popup which contains the applet after they leave it open allow it to run it uses a port and then uses the localhost ip like so 127.0.0.1:64653 to send request and basicly curl by the user ip. i decompiled the applet the website was using and they were using java.net.ServerSocket and some other java code but i do not know anything about java. I would to know how this can be done.

    Read the article

  • Custom HTTP Request headers in HTML

    - by matsko
    Does anyone know if its possible to send out custom http REQUEST headers in HTML without having to use javascript (no xhr wrapper). Would it be possible to define them as meta tags within the head? Or may they be defined in the form somewhere? <meta http-equip="x-something-custom" name="custom value" /> this works, however, this is a RESPONSE header. What I need to set a REQUEST header. I'm not looking for setting hidden fields in forms, but actual raw http header manipulation with html tags. Is this possible?

    Read the article

  • Handling OPTIONS request in nginx

    - by ctmiller
    We're using HAProxy as a load balancer at the moment, and it regularly makes requests to the downstream boxes to make sure they're alive using an OPTIONS request: OPTIONS /index.html HTTP/1.0 I'm working with getting nginx set up as a reverse proxy with caching (using ncache). For some reason, nginx is returning a 405 when an OPTIONS request comes in: 192.168.1.10 - - [22/Oct/2008:16:36:21 -0700] "OPTIONS /index.html HTTP/1.0" 405 325 "-" "-" 192.168.1.10 When hitting the downstream webserver directly, I get a proper 200 response. My question is: how to you make nginx pass that response along to HAProxy, or, how can I set the response in the nginx.conf? Thanks!

    Read the article

  • jqtouch load content with ajax

    - by ndrizza
    I am loading this page directly inside of jqtouch. First the page shows "Loading..." Then it should execute a GET Request and refresh the content of the div ("tagcloud") as soon as it get's the content from another php file. (I prefer to load the content this way as otherwise jqtouch freezes for 2 seconds until the content is loaded and then animates to the next page.) <?php $link = $_GET['link']; ?> <div id="TagNews"> <div class="toolbar"> <h1>TagNews</h1> <a href="#" class="back">NZZ</a> </div> <div id="tagcloud">Loading...</div> <script type="text/javascript"> $.get("cloudnews2.php?link=<?php echo $link; ?>", function(data){ document.getElementById("tagcloud").innerHTML = data; }); </script> </div> Howewer, the request never gets loaded. The code is working outside of jqtouch. But inside jqtouch the GET Request doesn't work. I can't figure out why. Could you please help me to do this request?

    Read the article

  • Controller not handle request and page not found problem in ASP.NET MVC

    - by Richa Media and services
    1 in my asp.net mvc project my controller not handle request he says that "page not found". but page is located in folder correctly. 2 i have a problem in second page who is handle by controller who is worked correct but problem jghkdfghkfhgjfh in temprary asp.net files. i remove it. but he comes when i redebug our project. 1 My problem is why my controller not handle request. 2 How to remove asp.net temprary files because when i re start debug he comes and give me error.

    Read the article

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