Questions tagged [post]

14268 questions
0

votes
0

answer
18

Views

Getting POST API to work with ajax using JavaScript

I'm trying to reach an API from inside my tag manager. The language to use for the so-called building blocks in this tag-manager is JavaScript. The POST API I am trying to use is fully functioning and works like this: input: {'features': 'xyz'} output: [0.45] I set up an ajax statement, but it does...
T.Beil
1

votes
2

answer
36

Views

POST method is not working on same page PHP

I know this is asked question however I have tried almost steps but its not working. I know there is a silly mistake somewhere need an experts eye. My code: // if(isset($_POST['country'])) if($_SERVER['REQUEST_METHOD'] == 'POST') { $country = $_POST['country']; echo ''; echo 'alert(' Officer Alread...
mark
1

votes
1

answer
28

Views

How to get API post request with json data

I'm triyng to make an API request using postman and body raw data, but I can't read the data on server side. My request: http://prntscr.com/n38hes http://prntscr.com/n38hq9 I've already tried: app.post('/test', function (req, res) { console.log(req.query) }) and: app.post('/test', function (req, res...
Paulo
1

votes
1

answer
44

Views

How do I restrict an auto-generated route to accept only POST requests?

We have overridden Sonata's RegistrationController using Easy Extends. In our generated appDevProjectContainerUrlMatcher class, we now have the following lines: if ($pathinfo === '/password/reset') { return array ( '_controller' => 'Application\\Sonata\\UserBundle\\Controller\\RegistrationControll...
Patrick at work
1

votes
2

answer
60

Views

Query Custom Post Types & Order By Custom Post Type

Is it possible to query multiple CPTs and then order in a preset way? For example, I have 2 CPTs & 1 being the WP default 'post' and would like the loop to return 6 results, ordering as below. CPT-1 CPT-2 POST CPT-1 CPT-2 POST Is this possible without splitting the loop? I did have a quick search,...
user1235285
1

votes
2

answer
44

Views

Angular - Check if all Subscriber in a list are finished

I use an interval to post a variable amount of data in a forEach loop to a backend. What I want to do is: If the first call of the post method is not finished but the interval already wants to call the method a second time, the call should be blocked until the first call it finished. I try to show t...
WeSt
0

votes
0

answer
3

Views

Request Part not preset Errorr - Post an image to Backend Service

I try to send an image from an Front-End ionic application through a post method to Back-End services in Spring boot I have done this method that makes the post to the backend url with the image inside a FormData object: uploadImageService(url: string, image: any) { console.log('post service: upload...
0

votes
0

answer
11

Views

Show only the text string from a Html-form

I'm set up a Html-form which send a form with the mailto action. I want that the String from the Textfield only appears and not the form format. It would be great if the method is only made in Html. Title of the document Title Nachricht: The actual results are: Text= Textstring from textarea Send=Se...
morissirom
0

votes
0

answer
5

Views

Imgur api axios request blocked by CORB

Everything in my project works as it should. I get the 'request' answer (200 OK) but I still get this warning; ('Cross-Origin Read Blocking (CORB) blocked cross-origin response https://api.imgur.com/3/upload with MIME type application / json. See https://www.chromestatus.com/feature/5629709824032768...
Ibrahim Yolbir
0

votes
1

answer
15

Views

I can't get my “event.preventDefault” to work when submitting a form through button in overlay

As the title says, I can't get my event.preventDefault to work on a submit POST request of my form. Using standard js, flask, css, and html. ASFAIK there are no errors anywhere. If I can just have the overlay stay where it is and still send the post back to flask that would help me a tons!! Thank y...
tinnick
1

votes
2

answer
74

Views

git diff-tree not working in post-receive hook

I have a bare remote repository with source files in which I want to build only the changed files after it has been pushed to. I thought the best way to detect which files have been changed would be by putting the command changed_files=$(git diff-tree --no-commit-id --name-only -r HEAD) into a post...
Tobias Feil
1

votes
2

answer
22

Views

Python How to GET Image and then POST (via requests library)

I am using python to try and get an image from one API, and then post it to a separate API. So far I have this code: def create_item(token, user_id): url = '' headers = {'Authorization': 'Token {0}'.format(token)} image_url = '' image_obj = requests.get(image_url) data = { 'image': image_obj.content...
Hybrid
-2

votes
0

answer
15

Views

Send crypted byte[] by POST

This the code on client side,who crypt a text message (password) and make a call to server On both side (client android /server php), encrypte and decrypte works, i use the publickey to encrypte and privatekey to decrypte, and ofc same pair of key, the problem seems to be on the post parameter, i a...
Julian
1

votes
0

answer
121

Views

Is there any way to view the “Request Body ” received by the server in the server logs

I am having trouble in logging the 'Request body ' sent to an engine that i created . The engine is present as a war file (in webapps) and I want to access what request body was posted to the engine . I get only this response in the ' localhost_access_log.2017-12-28.txt ' : 192.168.3.206 - - [28/Dec...
CamundaGuy
1

votes
1

answer
45

Views

JSON post returning null when passed from view to controller

vm.Name returns null when it's passed from view to controller but when I call for the data in view, it shows up fine. $scope.afterSelectedIngredient = function (selected) { if (selected) { $scope.selectedIngredient = selected.originalObject; $scope.newIngs = []; var ing = {}; ing.Name = $scope.selec...
klent
1

votes
2

answer
54

Views

How to remove an element from an array within Mongo

I'm completely stuck with Mongoose and remove method. I have a page with comments and form with a button Delete. My goal is to delete only that comment which was clicked. Below is my MongoDB file (By the way I use method override of the express library to handle both request post and delete). { '_i...
Ar2zee
1

votes
1

answer
151

Views

camel rest servlet 404 instead of 405

Using the sample code from Camel in github in 1 I am getting 404 instead of 405. This is a summary of the code in 1 rest('/provider').description('Provider rest service').consumes('application/json').produces('application/json').get('/{id}').description('Find provider by id').outType(Provider.class)...
Bill
0

votes
0

answer
2

Views

res.redirect() searching but not loading

i'm trying to redirect a user to a page after checking his credentials through a post method. the thing is the page after the res.redirect function keeps trying to redirect but never does. app.post('/login', function (req, res) { MongoClient.connect(url, function(err, db){ if (err) throw err; var...
NeoK
1

votes
0

answer
35

Views

How to access the same session used by WinHttpRequest in a new browser instance?

I would like to automate a currently manual process in retrieving multiple cookie data (e.g. both 'sessionToken', and 'sessionID' from cookie data that's been sent out in a GET request header, which is triggered from browsing to the URL page) as well as parsing a value from the page's inner HTML (e....
intangibleAssets
1

votes
1

answer
749

Views

How to return a file using byte [] with web Api?

I trying export file with web Api. this is my client code : exportLicense(licenseIds) { return this.$http({ method: 'POST', contentType: 'application/zip', url: this.application.resolveWebApiService('Licenses', 'ExportLicenses'), data: licenseIds }); } ExportLicenses method from my backend side(my...
eagle
1

votes
1

answer
221

Views

How to debug request-promise MaxListenersExceededWarning

I've been working on a set-up script for a database and this evening I began getting some MaxListenersExceededWarning warnings in my console. I debugged the warnings to be coming from specific request-promise-native calls. I initially thought it may have something to do with payload size; however th...
E.Arrowood
1

votes
1

answer
1.2k

Views

PHP and CURL POST XML

I have been tearing my hair out for 2 days trying to figure this out and I wonder if any of you could help? I am trying to post an XML string to a server and they state 'All XML requests should be sent to our server with the 'xml' parameter name using the HTTP POST method'. I have tried numerous way...
Dean
1

votes
2

answer
50

Views

Sending post parameters with JsonObjectRequest volley to active campaign api

I am adding contacts to active campaign api but the request is not sending the post parameters.The parameters are being sent from postman but with volley its not working. I have tried sending params from the constructor also but no progress. Here is the code. Map params = new HashMap(); params.put('...
Wijdan
1

votes
1

answer
50

Views

Wordpress Custom Post Type Variable Overlap?

So, I have two different custom post types. Both of these have a number of multi-select boxes. The first one, I was able to get the data in these boxes to save to the post without issue. The second one, however, wasn't working. One of the 4 boxes had its data saved, and other form elements were s...
E. Steev Ramsdell
1

votes
0

answer
463

Views

Qt http post way “Protocol \”\“ is unknown”

void MainWindow::start() { QNetworkAccessManager* manager = new QNetworkAccessManager; QJsonObject obj; obj.insert('pro', 2005); obj.insert('id', 10010033); QNetworkRequest req; req.setUrl(QUrl('192.168.90.114:38080/udp/data')); req.setRawHeader('Accept-Encoding', 'gzip, deflate'); req.setRawHeader(...
Shijiang.Guo
1

votes
2

answer
44

Views

how do I edit a character in string line with form input

My code is given below I am trying to change a character in the string line with a new form input is here. $text = '12345678910'; $mumu ='456'; if(isset($_POST['pch'])) { $change = $_POST['change']; $newtext = str_replace('$change','$mumu','$text'); echo $newtext; } echo ' Edit Number '; but...
wapob
1

votes
1

answer
67

Views

POST request with no page refreshing in Yesod

The task is to create a registration form with pretty error handling. I'm a newbie in Yesod, so the only way I found to do this is: regForm :: Form User getRegRExtra extraFormWidget = do (formWidget, enctype) generateFormPost regForm Just val -> return val defaultLayout $ $(widgetFile 'reg/reg') ge...
errfrom
1

votes
1

answer
134

Views

file_get_contents fails, but POST request is made successfully

spoiler* convoluted code ahead Context main.php has a command-line like input, the file's form action attribute is submit.php. submit.php decides what other file to call, based on the input from main.php. In submit.php I adjust variables $url and $data, based on the input, then call file_get_content...
ebichuhamster
1

votes
1

answer
24

Views

Select Custom Post Types Per Category?

Trying to select custom posts by selected category $args = array('post_type' => 'speakers', 'posts_per_page' => 10, //'category_name' => 'saturday',// array( // array( // 'taxonomy' => 'category', //...
alex
1

votes
2

answer
31

Views

POST one _fixed_ variable to popup window

Simple question. Yet managed to spend the whole day on it and still no result. Researched S.O., Google. Countless postings. Yet none of the questions are to the point I am struggling with. Any good soul that can help answer the following question. All I want to do is POST a single predefined/fixed...
Eleanor
1

votes
0

answer
33

Views

AJAX function putting post in URL, rather than to page

I've got a dropdown, which when selected, should then go query the DB and get a report back. When the user selects the option from the dropdown, it should dynamically change the field without reloading the page. However, it does seem to reload the page, and the $_POST data is inserted and visible in...
Sam McLean
1

votes
1

answer
280

Views

HTTPS Request with content-length > 0 but body is empty

I am facing a weird issue with my android application. Sometimes, the server gets a POST HTTP request with just the headers and no body. I am using Retrofit 2.2 on android with OkHttpClient 3.6. In server side logs I can see that the content-length is > 0. From my understanding, content-length is ju...
Amit Barjatya
1

votes
0

answer
41

Views

Python Scraper - Request Post Function Not Returning Correct Page

I am working on my first website scraper and have ran into another issue. Below is my code. The website that is returned is the main page not the specific site for the parcel number I searched. Am I using the wrong html class to identify the search function? Or is there something missing in the Py...
Taylor29
1

votes
0

answer
81

Views

how to save value from POST method into parameter of Java class?

I'm new in Java, and currently try to create my own project, but have a problem with displaying information about user in his main page. Now I need to save a value from my JSP page (/login) which use method POST into parameter of my Java class('Controller'). login.jsp Log in with your account Log in...
Junior Java Mike
1

votes
1

answer
29

Views

f {$$state: {…}} in request instead of data

I'm trying to create request with data in it but it gives only f {$$state: {…}} in console $scope.createTask = function () { var req = $http.post('api/insert', { title: $scope.newTitle, description: $scope.newDescription, date: $scope.newDate }) .then(function (data){ console.log(data); }, functi...
howHighUR
1

votes
0

answer
957

Views

Making a HTTP POST request in Swift 4

I´m trying to send data to a PHP file on my server using URLSession. This seems to fail though, since no data is received on the server. While running the app, I get this console print: 2018-01-09 20:56:10.942359+0100 EinsatzPush[12182:8624757] [BoringSSL] Function boringssl_session_errorlog: line...
Nils
1

votes
0

answer
262

Views

Display custom taxonomy child terms with category image on parent term archive

I have a CPT with a custom taxonomy called 'equipment_cat'. I'm currently displaying the subcategories of a category on the category archive using the following code: I'm using Taxonomy Images plugin to attach an image to each category. I've created a custom page template to display all top level ca...
Ciaran Gaffey
1

votes
1

answer
34

Views

How are POST requests constructed?

How does a web browser construct a valid HTTP POST request from HTML source code? For example, the login form on https://stackexchange.com/users/login looks like: Email [email protected] Password Password If I intercept the request my browser sends, I can see the full POST request to be: POST /affili...
Michal Nerek
1

votes
0

answer
68

Views

Is there a way to specify trusted origins for post requests in google web app?

Let's say i created a google sheet to capture user's email addresses. On my website there is a small form and once the submit button is clicked and an ajax request to a google web app that writes data to a sheet is fired: // Let's select and cache all the fields var $inputs = $form.find('input, sel...
Felix
1

votes
0

answer
93

Views

WordPress PHP error getting posts from another wordpress blog

I'm using this code in the template-blog.php page of my website, to get posts from my first WP blog to the second WP blog, different websites using the same blog posts. this code has been working great for years, but suddenly it stopped working giving me invalid argument foreach on line 133 it gives...
Joey Arnanzo

View additional questions