FAQ Database Discussion Community


Sending escaped whitespaces in HTTP POST with JMeter

http-post,jmeter,whitespace
I'm having trouble with sending an HTTP POST request with a parameter that has a value that includes a whitespace. JMeter replaces every " " and "%20" with a "+". It seems to have something to do with the HTTP implementation as it occurs only when using HttpClient3.1 and HttpClient4....

Authenticity and Integrity of HTTP Requests

hash,http-post,digital-signature,integrity,authenticity
I have an API endpoint where external websites can submit a POST request. What would be the best method to make sure the requests are authentic and also are not tampered with, so they respect the principle of integrity? Since the data is not valuable such as credit card information,...

How to write a Serializable as the body of an http post request?

java,http-post,apache-httpclient-4.x
I have a client-server app in which I have a Serializable class on both sides. I have to write an object of that class using ObjectOutputStream from the client and read it using ObjectInputStream on the server. At the client I am using Apache HttpClient (version 4.2). I have to...

Web.Api not deserializing properties of Child Array in Post

asp.net,asp.net-web-api,http-post,asp.net-5
I have a complex object that is correctly deserialized from json in the browser, but when I post the same data back with jQuery, the child objects of an array aren't getting deserialized - they are all set to default values. I've tried changing the collections types from List, to...

Firefox - Intercept/Modify post data when some variable match some pattern

javascript,firefox,firefox-addon,http-post,tamper-data
I would like to know if it is possible to intercept and modify a post data when the url and some of the variables meet some pattern. for example: let the login url be: http://www.someonlineprofiles.com let the post data be: email: "[email protected]" pass: "mypass" theme: "skyblue" I would like that...

Call an ActionMethod from one controller to another with HttpPost

asp.net-mvc,asp.net-mvc-3,http-post
I am looking at different ways to call an ActionMethod from Controller and I know that you can call an ActionMethod from One controller to another. However, we can see that some of the actionmethods are decorated with [HttpPost] and if we are calling these methods from the View then...

Python requests http post data with cookies

python,cookies,http-post,python-requests
I have written an script in order to login to my account: import requests session=requests.Session() post_data={'login':'login', 'username':'user', 'password':'password'} cookies=session.cookies post_response=session.post(url='https://www.mywebsite.com', cookies=cookies, data=post_data) print post_response.content When I run that the web site returns me an error: It seems your browser doesn't allow cookies, please enable cookies first....

Get a value set via Javascript in a HTTP Post function

javascript,c#,asp.net-mvc-5,http-post,asp.net-mvc-views
I am coding a MVC5 internet application and would like to know how to set a value in Javascript in a View that can be retrieved in the View's HTTP Post method. I have tried this View code: <input type="hidden" id="testHiddenField" value="test" /> With this Javascript code: $("#testHiddenField").val("test value set");...

Python send JSON using HTTP POST

python,json,curl,http-post
I need to send simple JSON using POST to webserver. Now I'm using curl and it works: curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{"abc":123}' http://1.2.3.4:4321/api/test How can I do it in python? I wrote: import urllib2 import json from json import JSONEncoder jsonString= JSONEncoder().encode({ "abc": 123...

Custom header not included in the http post request

c#,oauth-2.0,http-headers,http-post,boxapiv2
Box.com's Enterprise User Provisioning API requires OAUTH2 token in the header of the request ("Authorization: Bearer faKE_toKEN_1234"). I've ran the code below against http://www.xhaus.com/headers, http://httpbin.org/post and http://www.cs.tut.fi/cgi-bin/run/~jkorpela/echo.cgi and observed packets with Microsoft Network Monitor and as far as I know my request header does not include the "Authorization" value I...

Angularjs code not working in chrome

angularjs,google-chrome,laravel,http-post,laravel-5
Hello I built my application using angularjs and laravel. Personally, I use firefox for development and testing, so I did not notice this till it was brought to my attention. My application works only in firefox but not chrome or chrome based browsers, I am also unable to trace the...

Is there a recommended way of doing post request in android? [duplicate]

android,http-post
This question already has an answer here: Sending POST data in Android 8 answers Is there a recommended way of doing post request in android? because before I use HttpPost and HttpClient for executing post request but these classes are now deprecated in API level 22....

how do I set an Image which is Received in a Json Object thorough a web service as a response below…?

android,json,imageview,http-post,bytearray
how do i decode this to show in an ImageView...? in Android...

how to do dynamic sized json response parsing?

json,http-post
I have a http get call which will populate the entire student list with id, name and class. Can anyone help me on how to find the id of the kid for a name? The response will be in the below mentioned format. [ { "id": 1, "SchoolName": "Cp", "StudentList":...

how to serialize a long string and maintain the formatting?

c#,json,serialization,json.net,http-post
I have a console application and writing a string content (a long comment you can say) through POST method to LiquidPlanner comment. I have a long string having some html tags and maintains a format like following. When i am serializing through JsonConvert.SerializeObject then formatting of that comment is breaking...

Which one is better? Ajax post or page post[Controller httppost] when only one form is there in a page?

ajax,asp.net-mvc,http-post,postback,form-submit
I have a page called Bookprogram which contains 6 input controls namely, txtName, txtEmail, txtPhone, selectcat[dropdown for categories], txtDate, txtMessage. Now when am done with all the validations for the above control, I want to store the data in db. I know how to perform both in ajax as well...

Android HTTPPOST executing PHP script twice

java,php,android,http-post
I'm working on a basic Android APK that is going to be a basic mobile version of a website I run. A portion of the APK enables people to sign up for users accounts (basic registration). I'm using HTTPPOST to send the user form information to a PHP script. All...

How to return some data from HttpServlet's doPost() method?

java,servlets,http-post
I am writing a java class that extends HttpServlet thus overwrites doPost() method. Inside the doPost() method, some data object is assembled, but I am not sure what is a better way to return the data. For instance, public class FormSubmission extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response)...

How do I resolve ModelState.IsValid = false while binding a List type?

c#,asp.net-mvc-5,http-post,modelstate
I'm getting an ModelState.IsValid = false from a List that contains a class object that has its own id's. I've seen some examples of how to exclude class properties from the [HttpPost] method while binding that look like this: [Bind(Exclude="Id,SomeOtherProperty")] My Question: How do you exclude the Id that belongs...

Make a request to download a video in Python

python,http-post
I have links of the form: http://youtubeinmp3.com/fetch/?video=LINK_TO_YOUTUBE_VIDEO_HERE If you put links of this type in an <a> tag on a webpage, clicking them will download an MP3 of the youtube video at the end of the link. Source is here. I'd like to mimic this process from the command-line by...

PNG from Post Request loading into Canvas

javascript,jquery,ajax,canvas,http-post
This is a very specific problem, and I am yet to find anyone else asking it. Basically I have a servlet that accepts some parameters and returns a PNG image. I know the servlet works because if I open the page itself with the given parameters, the file is created...

stack exchange api post method

android,http-post,stackexchange-api
I am trying to upvote a question using the stackexchange api in android. using the url https://api.stackexchange.com/2.2/questions/{questionID}/upvote but in the log its just showing something like this [email protected] API link for upvote a question is https://api.stackexchange.com/docs/upvote-question When I am trying from api link its working, but not with the code....

rails storing HTTP POST into variable

ruby-on-rails,xml,http-post
I am trying to build a rails app to receive a HTTP post with a huge XML payload. Goal is to parse the XML and store parts of the content into database. My first goal is to be able to store the XML contents into a variable and parse the...

Java + jackson parsing error Unrecognized character escape

java,json,jackson,http-post,parse-error
I need to do a POST json string , using HttpClient. Following will be the code i have. From the other end the Json is mapped to an object. HttpClient client = HttpClientBuilder.create().build(); HttpPost post = new HttpPost(url); String jsonData = "{ \"provider\" : null , \"password\" : \"a\", \"userid\"...

AsyncTask data communication with nested Classes

java,android,android-activity,android-asynctask,http-post
I have a specific scenario and I need your help. I'm trying to build an App in Android that involves network communication. I am using AsyncTask for the http POST requests. I have another class called Proxy (not a good one.. will be changed) which holds different kinds of functionalities...

How to perform POST request involving JSONObject in java-jersey?

java,http,jersey,http-post
I have the following code to create a JSON object: Client client = ClientBuilder.newClient(); //response is the value of some GET request I performed before JSONObject root=new JSONObject(response.readEntity(String.class)); //url is assigned to URL to which I wanted to POST. WebTarget target2=client.target(url); Response response2=target.request(MediaType.APPLICATION_JSON_TYPE); response2.post(*what goes here*); What do I need...

Sending an image via a post request from an Ionic app to a rails endpoint

ruby-on-rails,angularjs,cordova,http-post,ionic-framework
I am currently working on an Ionic mobile application which will eventually take photos, attach a location and send them inside a post request to a rails endpoint. After looking at this link and this link and countless others, I have been unable to find any solid information on implementing...

Ionic app data from html to php server

http-post,ionic
IONIC APP post data to php server : Data not inserted into mysql database. I am new to ionic framework, I am struggling to post data from html to php in ionic. Please help me out. 1. HTML file -->index.html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1,...

Trying to HTTP POST But Getting MalformedURLException: no protocol: yahoo.com

java,http-post
Overall I'm trying to write a script that captures the servers' response to an HTTP POST using java. Unfortunately, I'm stuck at encoding the URL portion of it. While I followed several online example on encoding a URL, I still get MalformedURLException... Any idea what might go wrong in the...

Google Plus API Count Call Failing

php,json,google-api,http-post,google-plus
I've created an POST request to pull the share count for a specific URL from Google Plus but have been unable to get any count value returned. Am I going the long way about it or is there an easier way to retrieve this data, for example Facebook and Twitter...

Setup Github Webhook for AWS EC2 server

github,http-post,webhooks
I have a webapp deployed in aws ec2 instance. I recently got to know about Github Webhook. Now i am trying to setup webhook service for my ec2 server. Can someone pls give a walk-through about: 1. How to receive the webhook payload for server endpoint. 2. What will be...

Request.Form empty?

c#,asp.net,http-post
i have a aspx form <form id="form1" runat="server" method="post"> <div> <asp:Panel ID="Panel1" runat="server" Width="362px"> <asp:Table ID="Table1" runat="server" CellPadding="5"> <asp:TableRow> <asp:TableCell> <asp:Label ID="Label1" runat="server" Text="UserName :"></asp:Label> </asp:TableCell> <asp:TableCell> <asp:TextBox ID="userName" runat="server"></asp:TextBox> </asp:TableCell> ----- SOME CODE HERE--- </asp:Table> <asp:Button ID="btnSubmit"...

HttpPost not working in Android

php,android,mysql,http-post
I am trying to make a HttpPost from my app to a php script, which will then insert data to a remote database. I'm not getting any runtime errors, but the data never gets inserted into my remote database. Code: public class InsertResult extends AsyncTask<String, String, String> { @Override protected...

Http Post with duplicate name values MVC

c#,asp.net,asp.net-mvc,razor,http-post
In MVC I have a form that uses a lot of duplicate information. Basically they click a button and there is another "form"(text box drop down list etc) that pops up. When they click the submit button however all of that comes back with the same name. How would I...

Posting A String Array

arrays,asp.net-mvc,asp.net-mvc-5,http-post
How can I handle an array of input For example I have in my view: <input type="text" name="listStrings[0]" /><br /> <input type="text" name="listStrings[1]" /><br /> <input type="text" name="listStrings[2]" /><br /> In my control I try to get the values like: [HttpPost] public ActionResult testMultiple(string[] listStrings) { viewModel.listStrings = listStrings; return...

AngularJS / OAuth 2 transport-layer security

angularjs,http,oauth-2.0,http-post
The OAuth service I am trying to get the response from is working but something wrong in my code which does not make the request. $http.post(myURL, 'grant_type=password&username=' + userName + '&password=' + passWord, headers: { 'Content-Type: application/x-www-form-urlencoded', 'Authorization Basic ' + btoa(secretWord) }). success(function (response) { console.log(response); }). error(function (response)...

Send a string from client to server, then save the file [using C]

c,client,http-post,server
I have these two C codes below consisting of a client and a server. The code is simple: 1- Server listens and waits for a connection 2- Client sends a string HTTP Post to Server 3- Server gets the request, posts back a response 4- Client receives response But what...

Android Volley: null value being received at server for String params sent with POST request

android,http-post,android-volley
I am sending POST query along with String data from android device using Volley library. The server however, is receiving only null values for the params. My code goes like this: final String param1 = "one"; final String param2 = "124843"; final String param3 = "878942"; final String param4 =...

Simulating latency in a HTTP POST call on Linux

linux,http-post,fiddler,latency,simulate
Use Case I am working on an enterprise level payment application (written in JAVA). I am looking to simulate latency on a HTTP POST call that is made to a bank. This will allow me to simulate different latency/unavailability scenarios that may occur. The Code The following piece of code...

When sending information from the client to the server, do I enforce rules on the client side or server side (or both)? [duplicate]

javascript,c#,asp.net,asp.net-mvc,http-post
This question already has an answer here: JavaScript: client-side vs. server-side validation 11 answers My question is about what is necessary and/or best practice. Suppose, for example I need some text from an input into my controller, and that text isn't to be blank. <form action="BaHumBug/Index" method="post" id="xmasTextForm"> <input...

Automated data retrieval from website using POST not working due to http 405 error

python,ruby,perl,http-post,bots
I'm working on something similar to Automate data retrieval from a web site using a Ruby web bot to automate a script to get the data from result website (submit a roll no and get the result). I'm using Ruby here and using the POST method to submit the roll...

How to HTTPPost ASP.Net MVC 5 CheckBoxList to database

c#,asp.net,asp.net-mvc,entity-framework,http-post
I am having trouble getting the values to post to my database table from a checkboxlist. Here are my models: public partial class SecurityChange_Access { public int ID { get; set; } public string Access_Name { get; set; } public bool IsSelected { get; set; } } public partial class...

DjangoRestFramework - View is able to create a user object without any input for mandatory fields

django,validation,http-post,django-rest-framework
I am using Django 1.8 and Python 3.4.0. I am using the DjangoRestFramework. I want to create a User object. According to django/contrib/auth/models.py it says class User(AbstractUser): """ Users within the Django authentication system are represented by this model. Username, password and email are required. Other fields are optional. """...

Uploading Image to Server from NameValueCollection

c#,asp.net,vb.net,http-post,namevaluecollection
I am using ASP.net 4.5 with VB.net This is my TestPage.aspx code <%@ Page Language="VB" MasterPageFile="~/Master.master" AutoEventWireup="false" CodeFile="TestPage.aspx.vb" Inherits="TestPage" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderMaster" runat="Server"> <form role="form" method="post" id="Test_form" action="TestPageLOAD.aspx" <div class="form-group"> <input class="form-control" type="text" id="headline" name="headline" /> </div> <div class="form-group"> <div...

PHP sending a post [duplicate]

php,mysql,database,post,http-post
This question already has an answer here: Syntax error due to using a reserved word as a table or column name in MySQL 1 answer I am currently trying to use PHP as a backend and MYSQL as my database to setup a simple PHP script that will send...

Roblox HttpPost

php,lua,http-post,roblox
I cannot get the HttpService's PostAsync method to pass my data into the $_POST variable (php). According to the documentation, it should be passed as 'data' ($_POST['data']), but I'm getting nothing. var_dump($_POST) says that it's just an empty array. Here's the bit of code in my lua script local json...

how to post objects from angular to a webapi controller

javascript,c#,angularjs,asp.net-web-api,http-post
I am creating a pdf using pdfsharp. I need to pass the chart legend data(name,color) to the pdfsharp controller. I am using a angular $http post, a ajax post would be fine as well. the error I am getting is Request...

Unsupported grant type error when requesting access_token on Spotify API with Meteor HTTP

javascript,http,meteor,http-post,spotify
I've been unable to solve a problem while requesting an access_token on Spotify API with Meteor HTTP. Indeed, when I make a POST call to the Spotify https://accounts.spotify.com/api/token. I get the following response : {"statusCode":400,"content":"{\"error\":\"unsupported_grant_type\",\"error_description\":\"grant_type must be client_credentials, authorization_code or refresh_token\"}" I think this may have something to do with...

codeigniter view not loading using jquery $post

jquery,codeigniter,http-post
I need to post some values to controller and load a view using jquery $post method, but the page is not loading, but i can see the page in console of browser. My code: $('#fm_reservation').submit(function(){ var days = getTimeDiff(); $.post(base_url+'vehicle/getVehicles',{'vehicle_name':vehicle_name,'days':days},function(data){ }); return false; }); Controller: public function getVehicles(){ $vehicle_name =...

Persistence of Redirect URL when redirecting after a POST and passing data

django,django-forms,http-post,http-redirect
Upon successful submission of a form, I redirect to a "success" page that display a 'thank you' message along with some information about the submission. To do this, I put the POST data in session, Redirect to the appropriate URL, and then render the template using the session data. But,...

ASP.Net MVC, WebAPI, AngularJS - Check if value exists in database

asp.net-mvc,database,angularjs,asp.net-web-api,http-post
I am using webapi and angularjs in my ASP.net MVC app. Everything is working good but in my insert (post) method I need to check if a value exists in the db before doing an insert. I am not sure where that should go. I ruled out the webapi because...

Using requests module to log out the user

python,python-requests,http-post
I need help in constructing post request for the logout from web-site. The source code for the logout button(actually it's not a button) is the following: <a tabindex="9" title="Log Out" href="/logout.jsp?submit_ButtonOK=true" onclick="removeLoginCookie();">Log Out</a> My code doesn't work. The user is still logged in after script performes. logout = requests.post(url+'/logout.jsp?submit_ButtonOK=true') print...

How to send input from HTML Form and use it in php CURL function

php,html,curl,http-post
I'm new to web programming and I was looking to find the solutions on the internet but I get stuck, so anyone can help me I would appreciate his effort very much. I have two files. The first file is an HTML form like this. <html> <title>index.html</title> <body> <form action="index.php"...

AtTask URI endpoints

ruby,arrays,json,http-post,attask
I have been in the process of building a small application to pull and push data using the API and have a few questions regarding where I can post an array of hashes containing new data to the reservedTimes (RESVT) endpoint. As it has been previously asked on SO, one...

Android Incorrect value when converting String to StringEntity

android,string,http-post,jsonobject
I am sending a string to server using HttpPost. This string is a JSONObject thath i have previously converted to String So far everything is working properly... It must be sent with content-type "application / json". To send it, convert my String to a StringEntity and add to httpPost.setEntity (my_string)...

How to give an order for HTTP-POST request?

php,xml,http-post
Hy ! Case : I wrote an API (in PHP) who received HTTP POST request in xml to update/read or delete some data in another xml file (use to store all data, my client doesn't want SQL or another thing). But for my test with Simple Rest Client, I just...

How to work with HTTP Post in android?

php,android,http-post
i am new to android and i am following the simple example code available http://androidexample.com/How_To_Make_HTTP_POST_Request_To_Server_-_Android_Example/index.php?view=article_discription&aid=64&aaid=89 Here is the source code: public class HTTPPostEx extends ActionBarActivity { TextView content; EditText fname, email, login, pass; String Name, Email, Login, Pass; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_httppost_ex); content =...

Simple HTTP Post returning empty Request.Form

asp.net,http-post
I am trying a simply HTTP post to post data from one form to another in asp.net. sender page code <form id="form1" runat="server" method="post" action="CILandingPage.aspx"> <asp:TextBox name="txtUname" runat="server" Width="180px"></asp:TextBox> <asp:TextBox name="txtPassword" runat="server" TextMode="Password" Width="180px"></asp:TextBox> <asp:TextBox name="txtTransaction" runat="server" Width="180px"></asp:TextBox> and the receiver page has code lblUserName.Text =...

MVC Why are extra characters in URL?

asp.net-mvc,asp.net-mvc-5,http-post
MVC 5. Delete POST for deletion confirmation view I was used to seeing URLs like http://localhost:64740/Order/ and http://localhost:64740/Order/Delete/2061 But now I see: http://localhost:64740/%28S%28vq45x3gsflin11zvxcuueydg%29%29/Order/Delete/2061 I can't think why the characters are now present. Any idea why the extra characters are coming up? The effect is that now I can't delete any...

How to simulate a http post file upload process?

asp.net-mvc,http-post
I am automating the process of http post using HttpWebRequest in asp.net mvc. Basically if the Http post is successful, it will write all the post value into a database or a file. It works well with simple types such as strings,int, datetime. But I am not sure how to...

How to use two isset condition in single page

php,ajax,post,http-post
How do you use two isset() conditions in same page? This is how my code looks: if (isset($_POST["location_from"]) && !empty($_POST["location_from"])) { ......... ......... echo json_encode($returnValues); } if (isset($_POST["location_to"]) && !empty($_POST["location_to"])) { ......... ......... echo $value; } if (isset($_GET["id"]) && !empty($_GET["id"])) { ......... ......... echo $value_Id; } So in the above...

How do i send a httppost in android using AsyncTask?

android,android-asynctask,http-post
I am trying to use httppost to store data in a database. I found out that trying to do this in the main thread caused crashes, so im trying to use AsyncTask. this is the AsyncTask code I've created public class PostData extends AsyncTask<String, Void, String> { protected String doInBackground(String......

String instead of data

asp.net-mvc,angularjs,http-post
I'm trying to get data from the controller something like this: public IEnumerable<Custom> Search(string searchText = "") { return new[] { new Custom { Name = "a", Id = 1 }, new Custom { Name = "b", Id = 1 }, new Custom { Name = "c", Id = 3...

HttpHostConnectException 10.0.2.2:8080 refused

android,apache,tomcat,http-post
On executing the following statement the app does not respond for a minute and then following logcat message occurs : HttpPost httpPost = new HttpPost("http://10.0.2.2:8080/webapp/CreateUser"); logcat - org.apache.http.conn.HttpHostConnectException: Connection to http://10.0.2.2:8080 refused PS - i've tried using "ip address" , 127.0.0.1 AND localhost instead of 10.0.2.2 still the same case....

Pass parameters in Html.BeginForm that don't come from

c#,asp.net-mvc,http-post,html.beginform
I am using Html.BeginForm("Details", "ControllerName", FormMethod.Post) to send some parameters to my Controller. Everything is working fine. However, it only works for <input> tags within the Html. Is there a way to post the value of other tags? for example a <span> or anything else? so at the end in...

I need an option to HttpClient in Android to send data to PHP as it is deprecated in API 22

android,api,http-post,httpclient
Currently I'm using HttpClient, HttpPost to send data to my PHP server from an Android app but those all methods are deprecated in API 22 so what is the option to it. I searched everywhere but I didn't find anything.

POST request to REST API with JSON object as payload

java,json,rest,http-post
I am trying to get the JSON response from the REST API using the POST request that has JSON payload (should be converted to URL encoded text before sending). I have followed some tutorials to implement the process but I get error with status code 400. I may not be...

Uncheck Checked Boxes checked through Echo from POST[]

javascript,php,checkbox,http-post,reset
I want to uncheck these boxes on pressing my clear button. Form.reset doesn't work. Not does getelementbyid.checked = false. Here is how I have checked them <input type="checkbox" name="free" <?php echo empty($_POST['free']) ? '' : ' checked="checked" '; ?>>Free Shipping<br> This is the clear button: <input type="reset" value="clear" onclick="clearform()" style="float:right;...

Handling POST request (String) generated by Volley at web server

android,rest,http-post
I have made an android app which collects certain data from android device and then posts them as string to restful web server to receive corresponding response from server. I'm using volley methods to POST request. My code for sending data is as under: RequestQueue queue = Volley.newRequestQueue(getBaseContext()); String url...

How to send json data in the Http request to POST Method in JSON Parsing

objective-c,json,ios7,http-post
I need to Parse below string to POST method in iOS "jsonData":{"empId":"cxvd","password":"sfsd"} But I m getting the error as Res: Tomcat Error HTTP Status 400 - Required String parameter 'jsonData' is not present //------ Method I have used to Parse is ---------- // +(void) requestToServerForLogin:(NSString*)userName andPassward: (NSString*)password onCompletion:(RequestCompletionHandler) handler {...

Clojure Immutant 2 server Undertow; how to handle http POST?

clojure,http-post,paypal-ipn,undertow,immutant
Putting the following line into my compojure defroutes to use clojure-paypal-ipn calling the two handler functions. (POST "/paypal/ipn" [] (make-ipn-handler payment/paypal-data payment/paypal-error)) How do I handle a POST request within Immutant? I'm using Immutant 2.0 with Clojure 1.7-beta1 and building off the Immutant feature demo. Posting directly with cURL give...

How to access response Body after simulating a POST request in Node.js?

node.js,web-scraping,http-post,reddit
I have been trying this out for a long time now. I want to scrap contents from a subreddit that has adult contents. But, the problem is that, you have to answer a simple question before you are given access to that page i.e. if you are 18+ or not....

Sending Facebook user data to server fails - Android

android,mysql,facebook,http-post,facebook-login
I have an app with a facebook login (4.2), when the user logs in, I pass his data (name, birthday, etc) to my MySql online database. My problem is that on some devices I get empty strings, and I can't figure out why? The user data is sent to the...

Post request on volley not sending parameters on first click

android,http-post,android-volley
Im making an app in android studio and im using volley library to make post requests on the click of a button. The first time i press the button the response is always null, but the second time it works properly. Here's the code: public class LoginActivity extends Activity{ Button...

Send a JSONArray POST request with android volley library

java,android,json,http-post,android-volley
I would to send and recive json Array with volley. Now I can recive the array and it's ok. but I don't know how to send an request (For example : with post method ) ; JsonArrayRequest arrayReq = new JsonArrayRequest(URL, new Listener<JSONArray>() { } ...

Camel HTTP Endpoint: How to set URL-String to POST Parameter

java,http,http-post,apache-camel
Prerequisites Apache Tomcat 7 Spring 3.2.11.RELEASE Apache Camel 2.14.1 Camel HTTP Endpoint (<artifactId>camel-http</artifactId>) Problem At the moment I use following code to set POST-Parameters to the message body. The camel HTTP-Component reads the parameters and sends it. .setHeader(Exchange.HTTP_METHOD, constant(HttpMethods.POST.name())) .setHeader(Exchange.CONTENT_TYPE, constant("application/x-www-form-urlencoded; charset: UTF-8")) .setHeader(Exchange.CONTENT_ENCODING, constant("UTF-8"))...

Handle JSON response from POST-request

json,node.js,http-post
Im having trouble with reading JSON-response when sending a POST request to a oauth server. This is my code for POST: var request = require("request"); var querystring = require('querystring'); var postData={ grant_type: 'code', code: code, redirect_uri: uri, nonce: nonce }; request.post({ uri: oauth_token_uri , headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': oauth_code...

Android Cannot POST /api response

android,http-post
I am trying to do HTTP post request in a REST backend. The URL for the backend is using SSL therefore I have also added the necessary code to handle that. But I got the following response: Cannot POST /api Here is my code: protected String doInBackground(String... args) { try...

HTTP POST REQUEST USING PHP [closed]

php,http,post,http-post,httprequest
I have captured a HTTP Post request using tamper data . I need to make a php file which repeates the request for 100 times. The POST data has HOST,USER AGENT,ACCEPT,ACCEPT_LANGUAGE,ACCEPT ENCODING,CONTENT TYPE,X-REQUESTED-With,REFERER,CONTENT LENGTH,COOKIE,DNT,CONNECTION,PRAGMA,CXACHE CONTROl and some POSTDATA . Help me make a php script

send action to Asterisk Call Manager

php,curl,http-post,asterisk,telnet
I'm trying to make a checker script to check if the IP asterisk have Asterisk Call Manager. I did it by make php script and using curl - the result and the response was Asterisk Call Manager/1.3 Response: Error Message: Missing action in request It's good for right now, it's...

HTTP Post Rails 4 Issue

rest,ruby-on-rails-4,xmlhttprequest,http-post,net-http
Thank you in advance for any and all help. I've been having a ridiculous issue with trying to get my rails 4 app to take in data from an email parsing API that sends an XML response to a specified url within my application. For whatever reason I can't seem...

C# WebClient Headers not in the same sort

c#,http-headers,http-post,webclient
the Code : using (WebClient wc = new WebClient()) { if (Form1.ProxyEnabled) { WebProxy wp = new WebProxy(string.Format("{0}:{1}", PAddress, PPort)); if (Form1.AuthenRequired) wp.Credentials = new NetworkCredential(PUser, PPass); wc.Proxy = wp; } ServicePointManager.Expect100Continue = false; wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded"; wc.Headers[HttpRequestHeader.Referer] = "xxxxxxxxxxxxxx"; wc.Headers[HttpRequestHeader.UserAgent] = ua; wc.Headers[HttpRequestHeader.AcceptLanguage] = "en-US,en;q=0.8";...

How to call add account method for tempoplugin with post in C#

c#,httpwebrequest,http-post,jira,httpwebresponse
At this url there is a description how to call tempoplugin with usage of post. In order to achieve it, I created following string: also created following code for posting data: public static string HTTP_POST(string Url, string Data, string userName = "", string password = "") { string Out =...

Content-Type for Post with no parameter

http,http-post
From .NET code I need to do a HTTP POST of some xml to a customer URL. Some customers want me to use a post parameter and some don't. For those who do want a post parameter we are using something along the lines of Data=UrlEncode(Data) with a header type...

How to retrieve HttpPost parameters in c#

c#,http,http-post,http-post-vars
So I know that this works: [HttpPost] public string functionthatiuse() { string id = "";//does nothing return relevantinfo; } Then I use this Chrome POST extension shown below and I have a break point in the function which is how I know it reaches it. It's literally an empty post...

How to get only string from HTTPResponse RestApi Android

android,http-post,httpresponse,webmethod
I have tried this code snippet to get the response from android using HTTPResponse String s=""; try { HttpClient httpClient=new DefaultHttpClient(); HttpPost httpPost=new HttpPost("http://10.0.0.8:7777/HttpPostServlet/servlet/Login"); List<NameValuePair> list=new ArrayList<NameValuePair>(); list.add(new BasicNameValuePair("uname", valuse[0])); list.add(new BasicNameValuePair("pwd",valuse[1])); httpPost.setEntity(new UrlEncodedFormEntity(list)); HttpResponse httpResponse= httpClient.execute(httpPost); HttpEntity...

Posting data with angularjs v 1.3

angularjs,resources,http-post,asp.net-web-api2
I have a web api 2.0 application and I have to post data of a form.. Here my js code: (function (angular) { var public_area = angular.module("public-area", ['ngResource']); public_area.factory("MyService", function ($resource) { return { my_controller: $resource("/api/MyHttpControllerTest/") }; }); public_area.controller("MyController", function ($scope, MyService) { $scope.getPlans = function () { var pianiTariffari...

Swift dataTaskWithRequest completion block not executed

swift,http-post,nsurlsession
I have a function which posts a dictionary back to the server and return the status code or error content when there's an error. It works fine sometimes, while the rest of the time the completion section is skipped. func postData(url: String, query: NSDictionary) ->NSObject? { var error: NSError? var...