http-post

POST requests not working on IOS in Ionic2 App

亡梦爱人 提交于 2019-12-12 19:20:00
问题 I'm having an issue with HTTP requests. Everything is working fine in Ionic View, browser and Android, but not working on IOS. GET requests are working fine on IOS also. Any guesses, what can that be? I can provide you with more information, just tell me what info do you need. Here's what I have in my package.json: "dependencies": { "@angular/common": "2.2.1", "@angular/compiler": "2.2.1", "@angular/compiler-cli": "2.2.1", "@angular/core": "2.2.1", "@angular/forms": "2.2.1", "@angular/http":

Android http post request returns 403 after Django update to 1.6

岁酱吖の 提交于 2019-12-12 18:52:00
问题 I'm writing an Android app which sends data in JSON format to a Django REST API running on a local server. It is an https connection to the server and all necessary certificates are integratted into the app. Bevore we've updated to Django 1.6 we were running on Django 1.4 and everything worked fine. Now with Django 1.6 the app is still able to get the CSRF token, to log in and to do a HttpGet request, which returns the expected JSON object. Only the HttpPost requests are rejected with 403

perl retrieving page details after mechanize::POST

此生再无相见时 提交于 2019-12-12 18:41:19
问题 I am trying to gather data from a website. Some anti-patterns make looking finding the right form objects difficult but I have this solved. I am using a post method to get around some javascript acting as a wrapper to submit the form. My problem seems to be in getting the results from the mechanize->post method. Here's a shortened version of my code. use strict; use warnings; use HTML::Tree; use LWP::Simple; use WWW::Mechanize; use HTTP::Request::Common; use Data::Dumper; $| = 1; my $site_url

Post request to server using HttpUrlConnection

拥有回忆 提交于 2019-12-12 18:28:05
问题 I am stuck in between. I want to implement a POST method using HttpUrlConnection to Post the email,name and password for registering a user to the server. Here is my code : public void createNewProfile(View view){ new Post().execute("http://myurl.com"); } private class Post extends AsyncTask<String, Void, String>{ @Override protected String doInBackground(String... params) { try { URL url = new URL("http://myurl.com"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn

Web.Api not deserializing properties of Child Array in Post

隐身守侯 提交于 2019-12-12 18:11:29
问题 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 IEnumerables, but that has changed nothing. It is interesting that the number of elements I get back is the correct amount. Also this is a CORS POST, but I haven't had any problems otherwise. Models public class

record post in asp.net mvc 3 and jquery

狂风中的少年 提交于 2019-12-12 17:10:08
问题 Hi I'm quite new to ASP and jQuery and could do with some help. I want to use an Ajax request to record the number of times a post request is sent, but haven't got a clue where to start. I thought it might be something to do with an jQuery.ajaxSetup but am unsure. If anyone could help or a least point me in the right direction that would be great. 回答1: You could use the beforeSend callback: var count = 0; $.ajaxSetup({ beforeSend: function(jqXHR, settings) { if (settings.type == 'POST') {

Error on post message to the facebook wall in android 4.0.3

血红的双手。 提交于 2019-12-12 15:24:07
问题 I try to post message on user facebook wall. It's work on previous platform versions, but on Android 4.0.3 I have error: 07-19 14:53:02.945: W/System.err(29740): java.net.UnknownHostException: Unable to resolve host "graph.facebook.com": No address associated with hostname 07-19 14:53:02.965: W/System.err(29740): at java.net.InetAddress.lookupHostByName(InetAddress.java:436) 07-19 14:53:02.965: W/System.err(29740): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:245) 07-19 14:53:02

Making an HTTP post request to the Google Play Android Developer API

不羁岁月 提交于 2019-12-12 14:56:08
问题 I'm trying to authorize the Google Play Android Developer API. I'm at the step where I need to make an HTTP post request to exchange the authorization code for an access token and a refresh token. Google gives the following example request: POST /o/oauth2/token HTTP/1.1 Host: accounts.google.com Content-Type: application/x-www-form-urlencoded code=4/v6xr77ewYqhvHSyW6UJ1w7jKwAzu& client_id=8819981768.apps.googleusercontent.com& client_secret={client_secret}& redirect_uri=https://oauth2-login

Why does ASP.NET Web API allow only one parameter for POST method?

左心房为你撑大大i 提交于 2019-12-12 14:47:23
问题 I am new to ASP.NET Web API and I found that it has one limitation which is very annoying. It only supports one parameter to post method. (Read more here: Using jQuery to POST [FromBody] parameters to Web API) From that link, it seems like they design it this way. It doesn't make any sense to me to have such strange limitation. If anyone knows why it was designed this way, please let me know. 回答1: This is the way HTTP works. An HTTP POST sends a body. And as a web api, that body represents

AngularsJS POST JSON data to Symfony2

无人久伴 提交于 2019-12-12 14:08:13
问题 I would like to know why this is not working , I have a AngularJS app witch sends trough AJAX data to a Symfony2 Application. As you can see, data is sent in my network console <?php namespace Supbox\CloudBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\JsonResponse; class FolderController extends Controller { public function createAction(){ $post = $this->getRequest()->request; $name = $post->get("name"); $folder = $post->get(