FAQ Database Discussion Community
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....
parse.com,request
Parse now allows us to send 30 requests/second, but it is not straightforward to me. Quoting some info gathered: Here they say At 30 requests/sec, an app can send us 77.76 million API requests in a month before needing to pay a dime. So I suppose he meant send up...
android,post,request,httpentity
I was trying to connect my Android application to my Flask Server on localhost when i had this problem. To do more easy to detect the error i will let you the code of my Android application and the output of the log of Android Studio. First, the code of...
validation,laravel,request,laravel-5,laravel-validation
In one of my form requests I have the following code that changes the names of the input fields for validation messages: public function attributes(){ return [ 'title' => 'topic title', 'content' => 'post content' ]; } Now I want to add custom validation rules, so I created a custom...
c#,sockets,get,request,send
I want to send GET/POST request with sockets, and I have this code: Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); socket.Connect(Url, 80); byte[] contentLenght = Encoding.ASCII.GetBytes(Data); string[] masRequestString ={ "GET /"+Data+" HTTP/1.1\r\n" , "Host: "+Url+"\r\n", "User-Agent: "+textBox1.Text+"\r\n", "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n", "Content-Type: application/x-www-form-urlencoded; charset=UTF-8\r\n", "Referer: "+textBox2.Text+"\r\n"};...
node.js,request
I have a server side script written in Node.js and client side script written in C#. I'm trying to save file uploading from C# script using pipe method. However, I get zero byte file. This is what I have done - restify = require('restify'), session = require('restify-session')({ debug : false,...
php,post,request
I'm trying to receive a webhook from hipmob (live chat app) that should be triggered at a chat event. Documentation: https://www.hipmob.com/documentation/chat-events.html I've been following How to catch the HTTP POST request sent by a Shopify Webhook , and i have to say that i am completly new to this. I...
ios,objective-c,soap,request
I have been working with SOAP request and tested with SOAPUI and it was working very good. But when include in SOAPMEASSAGE in iOS and test it, I get error in the response and can't parse the data The working request <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:prod="http://schemas.datacontract.org/2004/07/ProdigyDAL.Model.Search"> <soapenv:Header/> <soapenv:Body> <tem:GetLatestNews> <!--Optional:--> <tem:websiteID>1</tem:websiteID>...
python,css,xpath,web-scraping,request
Hey guys following problem. I want to scrap data from a website. But there are 2 issues: I have setup to check pricing. That works very well but it does only work for page 1 and 15. But I want all from 1-15 like 1,2,3,4,5 etc. I have the problem...
java,struts2,request,liferay-6,interceptor
Does anybody know if it is possible to change/remove request parameter values in a Struts2 interceptor? The request parameter Map is an instance of UnmodifiableMap so it doesn't look like it can be manipulated with in the interceptor. UPDATE: I'm using Liferay so uParamsMap will be an UnmodifiableMap public String...
python,encoding,request
I am using urllib.request.urlopen to get a *.srt file from a web API. The (relevant) code (Python 3.x): with urllib.request.urlopen(req) as response: result = response.read().decode('utf-8') print(result) with open(subpath, 'w') as file: file.write(result) file.close() This works fine, with the exception of some files. With certain files I receive the following error:...
node.js,http,express,request,autodesk
I'm working on uploading file to Autodesk View and Data API and i cant figure out how to send curl by http, or request lib. To be specific i don't know how to set expect header. Here is the curl i try to send curl --header "Authorization: Bearer nqjy2YlqYVi9VqBLjKinixIkhDRA" --header...
node.js,login,request
I am using nodejs for a project,now I want login my account with passport npm,but not from webpage,from request post method,can it be done? main code like this: router.post('/login',function(req, res, next) { passport.authenticate('local', function(err, user, info) { if (err) { return next(err); } if (!user) { return res.json(null); } req.logIn(user,...
request,typescript
I'm trying to use the Request package in Typescript, the method definition being :- export function request(options?: Options, callback?: (error: any, response: any, body: any) => void): Request; I have an issue trying to match the headers in the Options. The Options and Header definitions are :- export interface Options...
ruby-on-rails,ruby-on-rails-4,request,minitest
When doing functional tests for controllers in rails how can I provide dynamic application instance variables to my test which live in the request. I have a @station object that is initialized in a before action in my application controller (available in all other controllers), however the @station object is...
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...
javascript,json,node.js,stream,request
I'm relatively new to Javascript and Node and I like to learn by doing, but my lack of awareness of Javascript design patterns makes me wary of trying to reinvent the wheel, I'd like to know from the community if what I want to do is already present in some...
php,symfony2,request,phpunit
I have modified the base Request class of my application as explained in the accepted answer of this question. It works very well, except when launching my functional tests, I get the following error: Controller "My\Bundle\AppBundle\Controller\MyController::searchAction()" requires that you provide a value for the "$request" argument (because there is no...
php,forms,exception,laravel,request
I am currently creating a website that, once the user arrives, they are greeted by a form with which they input their unique id and DoB. Upon entering the information and clicking submit, they are sent to the main form which has only a little information on it and the...
javascript,node.js,http,request
In using Node.js to query some public APIs via HTTP requests. Therefore, I'm using the request module. I'm measuring the response time within my application, and see that my application return the results from API queries about 2-3 times slower than "direct" requests via curl or in the browser. Also,...
django,session,authentication,request
I use custom user model and config the settings file correctly. this is reg view def user_reg(request): if request.method == 'POST': form = forms.RegForm(request.POST) if form.is_valid(): data = form.cleaned_data name = data['name'] password = data['password'] MyUser.objects.create_user(name,password) user = authenticate(username=name, password=password) login(request, user) return render_to_response('common/success.html',{'config':config}, context_instance=RequestContext(request)) else: form = forms.RegForm() return...
python-2.7,flask,request,wtforms,flask-wtforms
I'm pretty much trying to create a web app that takes 2 svn urls and does something with them. The code for my form is simple, I'm also using WTForms class SVN_Path(Form): svn_url=StringField('SVN_Path',[validators.URL()]) I'm trying to create 2 forms with 2 submit buttons that submit the 2 urls individually so...
python,post,get,request,python-requests
I'm trying to send a mix of GET and POST to a URL using requests module. Is there a way to do this? What I 've tried is the following: import requests payload = {'test': 'test'} r = requests.post("http://httpbin.org/post?key1=val1&key2=val2",params=payload) print r.text but when I see what is actually being sent...
web-services,soap,request,soapui
I m using Soap UI basic version for some mocking. I need to persist my requests to some file. I just have generated mock services with some predefined input to output rules, and i searched on net and found this: def logArea = com.eviware.soapui.SoapUI.logMonitor.getLogArea( "http log" ); def groovyUtils =...
java,jsp,servlets,request
How do I get the previous page URL from request using a servlet. For example, I'm from the index.html and I submitted a form from index, how do I get the index.html URL and use it in a servlet? request.getRequestURL() getRequestURL doesn't work since it only returns the URL of...
c++,qt,http,request,qurl
I have a link on Steam market listings: http://steamcommunity.com/market/listings/730/%E2%98%85%20Gut%20Knife%20%7C%20Safari%20Mesh%20%28Battle-Scarred%29 Now I'm trying to do a get request using QNetworkAccessManager: auto manager = new QNetworkAccessManager(this); auto url = QUrl(link, QUrl::StrictMode); auto request = QNetworkRequest(url); manager->get(request); But when I try to output my url, I get just this: qDebug() << link <<...
http,request,authorization,captcha,recaptcha
I'm writing an app which involves letting users to share comments on a website, which has a comment form with Google's reCAPTCHA embeded. I would like to load this page via HTTP and display CAPTCHA within my app, so that user can post comments from my app. Is it easy...
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...
java,spring-mvc,request,servlet-filters
I am using a HMAC Authentication filter. In the filter when I access my POST Request Body, I am able to get the XML in it. When I try to access the XML in the controller I am get a blank string. The xmlString in the filter is giving the...
javascript,node.js,request,npm
Using nw.js, I am just trying to save images in an array of img elements with different random names. But having a few errors, is something wrong with my code? for (i = 0; i < imgs.length; i++) { request(imgs[i].getAttribute('src')).on('error', function(err) { throw err }).pipe(fs.createWriteStream('data/imgs/' + randomString)) } imgs[] is...
java,android,http,request
I had created a simplest app, a default one and I want to try to post and retrive something from a php page MyActivty.Java looks like: package com.dolganiuc.victor.myapplication; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.util.Log; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; import...
android,string,web-services,request,android-volley
Android volley library is not accepting parameters from getParam() method.If it is given in query String then it works.I tried both GET and POST it doesn't works. But I want to give parameters POST Method.please check the code I have posted below. RequestQueue queue = Volley.newRequestQueue(getApplicationContext()); String url = AppConstants.WEBSERVICE_URL...
python,cookies,request
So I was looking at my chrome console for a post request that I was making, and there is a 'cookie' value in the header file that has this data: strTradeLastInventoryContext=730_2; bCompletedTradeOfferTutorial=true; steamMachineAuth76561198052177472=3167F37117************B82C2E; steamMachineAuth76561198189250810=E292770040E************B5F97703126DE48E; rgDiscussionPrefs=%7B%22cTopicRepliesPerPage%******%7D; sessionid=053257f1102e4967e2527ced; steamCountry=US%7C708d3************e569cc75495;...
ios,json,swift,http,request
I've been creating a function which retrieve objects from a JSON script. I've chosen for this to use alamofire for async request and swiftyJSON for easy parsing. However i seem to have a problem with it blocking the UI? How come it does that when it is async request? Do...
c#,asp.net,asp.net-mvc,post,request
Maybe I ask simple question, but I have it :) I have one site(call it SenderSite) and post receiver site(call it ReceiverSite). They hosted is different host servers in internet. SenderSite has written in asp.net and ReceiverSite has written in asp.net mvc. I open SenderSite in browser. I have form...
ios,swift,asynchronous,request
NSURLConnection.sendAsynchronousRequest and dispatch_async(dispatch_get_main_queue()) {} I see that one is specific to urlRequests but could one have also used the dispatch_async function to get a data from URL then do UI related stuff in an asynchoronous fashion? Thanks in advance, Ace...
java,request,client-server
I have a simple Client-Server App in Netbeans that send login request to server and listen to the answer from server. I declare these codes in the constructor of Client: try { socket = new Socket("localhost", 12345); oos = new ObjectOutputStream(socket.getOutputStream()); ois = new ObjectInputStream(socket.getInputStream()); }catch (Exception e) { e.printStackTrace();...
django,post,request,content-type
[SOLVED] Please see my answer. Any POST request sent with the Content-Type: multipart/form-data; boundary=xYzZY results in the request.POST QueryDict{} to be empty. Changing the Content-Type to multipart/form-data also results in the same error. Removing the Content-Type altogether results in the values getting passed correctly, and I can access them in...
javascript,node.js,express,request
I am trying to manipulate a string by splitting it into two. my js var request = require('request'); var cheerio = require('cheerio'); var href1,href; var str = "https://google.co.in/search?q=okay"+"+google"; request(str, function (error, response, html) { if (!error && response.statusCode == 200) { var $ = cheerio.load(html); var a = $('.r a');...
python,request,urllib2,user-agent
import urllib2 req = urllib2.Request('http://www.amazon.com/Sweet-Virgin-Organic-Coconut-13-5oz/dp/B00Q5CIL4Y', headers={ 'User-Agent': 'Mozilla/5.0' }) html = urllib2.urlopen(req).read() print len(html) That's the smallest example I can make. If you run that then ~1 in 5 times the length of the response will be 5769, and the other times it will be a normal usable response. Whats...
algorithm,request,server
I have some trouble even defining the problem. But the setup is this: There are multiple devices that have to push data to a central server. We are talking about 2-3k devices. The question is how to organize the request and the retries in case of failure, so that we...
javascript,json,node.js,express,request
I receive a JSON with lot of information but I want to delete a particular data, for example, if I receive the variable name, I want to remove this variable before adding my JSON in my Database. This is my function POST: app.post("/:coleccion", function (req, res, next) { POST if(req.body.name)...
html,json,get,request,animated-gif
Or someone else can confirm that this is an incomplete work because I'm getting every response except the ones listed. I plan to use this along with yahoo pipes....
html,jsp,java-ee,parameters,request
I am new to Java and programming in general. For background, I am working on my simple survey system. I have all the classes/methods necessary to insert and pull from MySQL and display the survey on my JSP page. This is my Index.jsp <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Survey...
mysql,sql,request
I have two tables order and retailer. In the order the address is an integer value and represent the id of the retailer. I need to select the address from the retailer table. I believe I have to do something like: Select * from order where (select .....) I cannot...
android,rest,request,android-volley
I searched about this topic and I didn't found something to clear my doubts. My problem is that I must fill some form fields with data that I have in a server using a rest api. Basically I throw 3 different independent requests, as they are independent I throw them...
mysql,table,request
I have such tables: http://i.stack.imgur.com/JMgN7.png How to, with just SQL select all the comments, for tracks with the genre of 'xxx'?...
node.js,rest,express,request
I've the following code: var request = require('request') ... var options = { method: 'post', rejectUnauthorized: false, url: '<my rest URI>', headers: { 'content-type':json}, Authorization:'Basic', auth: { user: username, password: password } } ... request(options, function (err, res, body) { if (err) { console.dir(err); retmessage= err; res.render(err); return; } console.dir('headers',...
ruby-on-rails,module,include,request
I have the following module inside lib/api_client: request.rb module APIClient class Request require 'digest/sha1' require "net/http" require "uri" def self.venues_response ... end end end wich i include in my controller class like this: class VenuesController < ApplicationController include APIClient I'd like to access it's methods from inside venues_controller like this:...
android,request,android-volley
I am using Android Volley lib in my project to execute network requests, all works very well but I have some troubles with the "cancel" feature of this lib. I explain my issue.. I've an activity, where I'm executing the request at OnCreate method, the request is called, no problem....
javascript,request,polymer
I have an image url that I would like to save in the Database How do I pass the parameters from the client to my container (my code on WeldPAd server)? I know how to make the server store data on the server (alreay asked) Regards Eran Lavi....
c#,asp.net,post,razor,request
I'm building a form, where the number of questions, or inputs on the form varies depending on the value in a database.Each input on the form is a radio type. The name of the tags are dynamic and are loaded from the database using @db.row.questionID which would look something like:...
php,jquery,ajax,post,request
I'm using jquery multiselect plugin and I want to perform an ajax request on a select/deselect event. My problem: When I send the request to the php file, ISSET(VAR) returns every time false so that I can't pass variable to the php file. But Firebug extension for Chrome/Firefox shows me...
javascript,node.js,request
I tried to scrape the data from within the single request like in the code bellow but it doesn't work. When I tried just one procedure it worked. How to call multiple procedures within one request procedure? var fs = require('fs'); var request = require('request'); var cheerio = require('cheerio'); var...
c#,rest,curl,request
i've been following this Making a cURL call in C# for trying to make a request with the LiveChat API in curl and receive the result on my C# application, the request should be filled as the following as explained in: http://developers.livechatinc.com/rest-api/#!introduction curl "https://api.livechatinc.com/agents" \ -u [email protected]:c14b85863755158d7aa5cc4ba17f61cb \ -H X-API-Version:2...
node.js,express,request,timestamp
Is there a way to access the time stamp of when a HTTP request is sent to a Node.js server? Something like: app.post('', function (req, res) { console.log(req.date); //or console.log(req.timestamp); } I tried out several things and already printed out the whole req object to the console, but didn't find...
ios,iphone,parse.com,save,request
I want to be able to save a users information while the iOS device is locked. I'm using background modes but the saveInBackground only seems to work for about 5 seconds then it stops saving. When re open the app it saves them all at once. is there a way...
php,forms,laravel,request
I have been pulling my hair out with this error for a few hours now but cannot understand why it is doing it. I have done this before on Laravel but it just does not seem to want to work. This is the method I am trying to get to...
node.js,oauth,request
How would one do the following with the request npm module? curl https://todoist.com/oauth/access_token \ -d client_id=0123456789abcdef \ -d client_secret=secret \ -d code=abcdef \ -d redirect_uri=https://example.com I've tried doing this: var body = JSON.stringify({ client_id: '0123456789abcdef', client_secret: 'secret', code: 'abcdef' }); var postBody = { url: 'https://todoist.com/oauth/access_token', body: body, headers: {...
node.js,callback,request
I have the following two files and can't get the result out of my modules request into the var inside app.js. I thought about module.exports exports as callbacks but I can't find the right combination. // app.js #!/usr/bin/env node // i am a nodejs app var Myobject = require('./code.js'); var...
node.js,request,streaming,npm-request
I am parsing a JSON file using a parsing stream module and would like to stream results to request like this: var request = require("request") fs.createReadStream('./data.json') .pipe(parser) .pipe(streamer) .pipe(new KeyFilter({find:"URL"}) ) .pipe(request) .pipe( etc ... ) (Note: KeyFilter is a custom transform that works fine when piping to process.stdout) I've...
python,flask,request
I'm having issues with correctly sending and receiving a variable with a GET request. I cannot find any information online either. From the HTML form below, you can see I'm sending the value of 'question' but I'm also receiving 'topic' from a radio button in the form (though the code...
javascript,iframe,request
<div id="result"></div> <button id="send">Request</button> JavaScript: var button = document.getElementById("send"), div = document.getElementById('result'); button.addEventListener('click', function() { var result = createIframe("f", "/lorem.txt"); console.log(result.contentWindow); div.innerHTML = result.contentWindow.document.body.innerHTML; }); function createIframe(name, src, debug) { var tmpElem = document.createElement('div'); tmpElem.innerHTML = '<iframe name="' + name + '" id="' + name + '" src="' + src...
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) {...
cookies,request,liferay
I'm doing some vulnerability check on Liferay by using Burpsuite. Through burpsuite, i changed the Get: request and the cookie Cookie: JSESSIONID=8415D05C1E66F72CE8803607B6FEC26B.node1; COOKIE_SUPPORT=true; USER_UUID="2n3duSU0cr8TgknmHzm8ghmRUS2LVJfx6zmuvGFspuY="; GUEST_LANGUAGE_ID=en_US; LFR_SESSION_STATE_2983586=1431672874448; COMPANY_ID=10154; ID=79307664464f436b414f657133626843444f577a65773d3d; from one user to another. The page then loads as if the user is the other user which i copied the request...
ajax,wordpress,request,constants
I cannot access my custom defined constants (in functions.php) when I'm doing ajax request with: add_action( 'wp_ajax_form_request', 'form_request' ); add_action( 'wp_ajax_nopriv_form_request', 'form_request' ); Accessible only standart WP constants, like TEMPLATEPATH. Is possible access my own, defined in functions.php?...
tomcat,request,haproxy
I am working on haproxy configuration for my tomcats, I have two backend group , 1st backend is having two tomcat and serving request in round robin method and other backend is having only 1 tomcat. Now I want if request goes to second backeng and it is down ,...
python,post,request
I have a Python code that sends POST request to a website, reads the response and filters it. For the POST data I used ('number', '11111') and it works perfect. However, I want to create a txt file that contains 100 different numbers as 1111,2222,3333,4444... and then send the POST...
php,http,post,curl,request
I'm sorry to disturb you but I can't figure out what is the error on my code. I'm trying to Make a HTTP Post Request on the following , my response code is 200 but It doesn't work. Below is my code. If anyone can help I would appreciate his...
javascript,node.js,request,cheerio
I have a node.js app that scrapes informations from a website. I'm using npm packages request and cheerio and the scraping works fine but I want to do something else when the request function is done. Here's some code: app.js var express = require('express'); var extractor = require("./extractor"); console.log(extractor('http://www.example.com'));...
c++,asynchronous,boost,request,mpi
I am trying to test an mpi request if it is done or not. However, there is a problem that I could not figure out. If I use test_all method as below, then I see that request is not done. string msg; boost::mpi::request req = world->irecv(some_rank, 0, msg); vector<boost::mpi::request> waitingRequests;...
python,django,view,request,username
I have a problem. in my code i have to use class ContactWizard(SessionWizardView): and I have encountered a problem. I have literally no idea how do i get username of currently logged in user :( @login_required def invite(request): return render_to_response('invite.html', {'full_name': request.user.username}) class ContactWizard(SessionWizardView): template_name = "invite.html" def done(self, form_list,...
node.js,request,logic,use,superagent
This issue in SuperAgent repository mentions the .use method to add logic on each request. For example, adding an Authorization header for JWT when a token is available: superagent.use( bearer ); function bearer ( request ) { var token = sessionStorage.get( 'token' ); if ( token ) request.set( 'Authorization', 'Bearer...
django,testing,request,action,admin
I'm new to django and I'm having trouble testing custom actions(e.g actions=['mark_as_read']) that are in the drop down on the app_model_changelist, it's the same dropdown with the standard "delete selected". The custom actions work in the admin view, but I just dont know how to call it in my mock...
ajax,http,post,request
I try to send an HTTP POST request from ajax to PHP, but I have a syntax error that I don't understand.. Is there anyone who can help me ? index.php var key = "keytest"; $.ajax({ url: 'requests.php', type: 'post', contentType: 'application/json', dataType: 'json', data: '{"uniqueKey" : '+key+'}', success:function( rep...
php,http,post,request,token
I'm trying to send a POST request with part of the webpage URL as the parameter. For instance, in this url: http://testsite.com/confirmEmail/?token=abcdefg I want to be able to send the input token with the value abcdefg. I want to make this responsive to different token values. Any ideas? Thanks...
python,function,request,urllib,nonetype
I'm doing a loop for multiple requests on a web database, each time it takes one geneId to request it to the database. If the geneId is referenced I can use the data I get for another request on a second database. But if the geneId is not referenced, it...
c#,sql-server,date,request
I have a weird trouble with a request. I have a table with a field 'datetime' named 'DATE'. Here an exactly exemple of one value : 2015-03-09 00:00:00.000 I do in my application (in C#) a request like this : 'SELECT ... WHERE DATE BETWEEN datedeb AND datefin' Here an...
symfony2,request,twig
I have a 404 error page set up through an event listener triggered by Kernel exceptions: public function onKernelException(GetResponseForExceptionEvent $event) { if ($event->isMasterRequest()) { $exception = $event->getException(); if ($exception instanceof NotFoundHttpException) { $response = new Response(); $event->setResponse( $response->setContent($this->templating->render( 'LandingPageBundle:Error:error404.html.twig', ['welcome_url' => $this->router->generate("welcome")] )) ); } } }...
php,validation,request,laravel-5
is it possible, in Laravel 5, to validate multiple Requests in order to insert related models after a form submission? I know how to validate multiple Model by using Validators but I want to do it with the Request Class. Laravel 4 : $validateUser = Validator::make(Input::all(), User::$rules); $validateRole = Validator::make(Input::all(),...
javascript,node.js,request
I want to download 70 images. Their complete size is around 100mb. This is my simplified part of code function downloadImage(src){ var dst = '...'; request(src).pipe(fs.createWriteStream(dst)); return dst; } arrayOf70.forEach(function(e){ var thing = new Thing({ // ... image: downloadImage(url) }); thing.save(); } The problem is there are too much concurrent...
c#,asp.net,cookies,request
We hit an unexpected error during our school project. Someone took the time and figured out what it was. But when he fixed it he couldn't explain what he did. I hope someone can explain the following line of code: public string aantalVoorArtikel(object id) { int artikel_id = (int)id; if...
php,arrays,json,request
Following is my code : $json_body = $application->request->getBody(); if I echo $json_body; then I get following output : { photo = ( { fileURL = "https://www.filepicker.io/api/file/UYUkZVHERGufB0enRbJo"; filename = "IMG_0004.JPG"; }, { fileURL = "https://www.filepicker.io/api/file/WZeQAR4zRJaPyW6hDcza"; filename = "IMG_0003.JPG"; } ); "status_info" = ""; } Then I execute following code : $request_data...
javascript,jquery,razor,request,.post
I am using a $.post function to send some data collected from an input box to a separate file, post_new_activity.cshtml . I am also using alert boxes for debugging purposes to see which line of code I get to. I am trying to pass one variable 'activity' to the external...
objective-c,osx,web-scraping,request
Hi so I wanted to retrieve data from this website: http://www.timeapi.org/utc/now for an app that I was making, but when I make the request with the following code, I always get null: NSURL * timeAPI = [[NSURL alloc]initWithString:@"http://www.timeapi.org/utc/now"]; NSURLRequest * urlRequest = [[NSURLRequest alloc]initWithURL:timeAPI]; __block NSData * responseData; [NSURLConnection sendAsynchronousRequest:urlRequest...
python,python-2.7,request
I'm learning Python by following Automate the Boring Stuff. This program is supposed to go to http://xkcd.com/ and download all the images for offline viewing. I'm on version 2.7 and Mac. For some reason, I'm getting errors like "No schema supplied" and errors with using request.get() itself. Here is my...
node.js,request,scrape
I don't know if this is something to do with coldfusion pages or what but I can't scrape these .cfm pages In the command line in a directory with request run: node> var request = require('request'); node> var url = 'http://linguistlist.org/callconf/browse-conf-action.cfm?confid=173395'; node> request(url, function (err, res, body) { if (err)...
javascript,node.js,request,imagedownload
I want to down some image on the site ,the image are saved by http://a.com/1.jpg http://a.com/2.jpg http://a.com/3.jpg So, I write the code to do it My code is: var request = require('request'); var fs = require('fs'); var mkdir = require('mkdirp'); var preUrl = 'http://a.com/'; var dir = './images'; mkdir(dir, function(err)...
php,rest,request
I’m trying to implement a simple service in PHP. The service needs to return strings to certain requests. However, when I try to echo the string, PHP somehow adds \r\n to the beginning of the string. I am using echo to output the response. I tried to echo one space...
javascript,python,django,request
I'm trying to read 4 parameters from a js request into a django app. This is how I'm doing the js request: site = "http://127.0.0.1:8000/products/loginfo/" + account + "?userId=" + userId + "&sessionId=" + sessionId + "&url=" + url; httpGet(site); This is the url in urls.py: url(r'^loginfo/(?P<siteid>[0-9])/(?P<userdid>)/(?P<sessionid>)/(?P<url>)/$', 'log_info', name='log_info'), And...
jquery,json,hyperlink,request
I am doing a small school project that is basically a web app that searches nearby restaurants by keywords = restaurant and the specific cuisine that the user chooses. However, I have a problem when getting the website of the place and putting it in "a" tag and when I...
java,spring,spring-mvc,request
I want to create a mapping for an URI like this. /reference/download/asdsa/asdas/sad/3c7d38f679a64d101c602da61dad9912.pdf The request mapping in my controller is: /reference/download/** The problem is, that the mapping is only working when I call the URI without the .pdf suffix. This is my code: @Controller @RequestMapping("/reference") public class ReferenceFilePageController { private static...
php,input,request
If I use the instruction die($_REQUEST['country']); report this error: Notice: Undefined index: country in C:\xampp\htdocs\my_project\cart.php on line 198 This happens only with the second conditional, the first conditional works perfectly and get the country: <?php } elseif(@is_numeric($_SESSION['user_registered_id'])) { ?> <input name="country" type="text" disabled id="pais" value="<?=$qpais?>" size="1" readonly /> <?php }...
java,sockets,http,post,request
I'm trying to handle a simple POST Request in Java using a Socket. I can receive the request header and answer the request without any problem, but I certainly can not get the body of the request. I read somewhere that I'd need to open a second InputStream to achive...
java,android,post,request
This question already has an answer here: Android, Java: HTTP POST Request 6 answers I am doing a post request in Android. It should give me a response in the form of a string. Thats what i do to check it. However it gives me an empty string back....
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...
javascript,node.js,request
Using the request module to load a webpage, I notice that for he UK pound symbol £ I sometimes get back the unicode replacement character \uFFFD. An example URL that I'm parsing is this Amazon UK page: http://www.amazon.co.uk/gp/product/B00R3P1NSI/ref=s9_newr_gw_d38_g351_i2?pf_rd_m=A3P5ROKL5A1OLE&pf_rd_s=center-2&pf_rd_r=0Q529EEEZWKPCVQBRHT9&pf_rd_t=101&pf_rd_p=455333147&pf_rd_i=468294 I'm also using the iconv-lite module to decode using the charset returned...
python,django,rest,file-upload,request
I'm writing a fairly small lightweight REST api so I chose restless as the quickest/easiest support for that. I didn't seem to need all the complexity and support of the django-REST module. My service will only received and send json but users need to upload files to one single endpoint....
javascript,node.js,request,xmlhttprequest
Up until now, I've always used the plain old XMLHttpRequest for GET requests, e.g., var xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.onload = function() { if (this.status === 200) { // do something } else { // do something else } }; xhr.send(null); I now came across request and...
node.js,express,routing,routes,request
Currently have a website running a node server that handles all requests for example.com and I created a completely separate wordpress blog on a separate server (running apache) that I would like served on a path like example.com/blog at 172.23.23.23 IP address. The wordpress server doesn't share any code or...