Questions tagged [bad-request]

HTTP status code 400, implying the request was not understood by the server and should not be redone without modifications.

641 questions
5
votes
4 answers

Call webservice on outside server from javascript using asp.net and C#

I'm trying to test web service calls using an ASP.NET page that creates a form with username and password fields and a "Submit" button. (Both jQuery and the .js file I'm using are included in script tags in the head element.) The "Submit" button…
elemjay19
  • 1,126
  • 3
  • 25
  • 51
4
votes
1 answer

Inconsistent HttpUrlConnection behaviours on Android - how to debug?

I have a weird problem: Implementing an interface to a webserver in my Android App, I connect to it using a HttpsUrlConnection. The connection uses additional HTTP Basic authorization (using setRequestProperty), but otherwise is a plain GET request…
Patrick
  • 4,720
  • 4
  • 41
  • 71
4
votes
1 answer

How do I configure swagger codegen (maven plugin) to return a bad request if one of my enum fields doesn't match?

I'm using the swagger-codegen-maven-plugin 3.0.20 with Java 10. I have these config options true false
Dave
  • 15,639
  • 133
  • 442
  • 830
4
votes
2 answers

ASP.NET MVC: How to handle 400 bad request error when url end with %

I am trying to handle all HTTP errors to my custom error pages, but I find that when there is a % at the end of url, i cannot use config setting or code to handle it, for example: http://localhost/abc% the response is: Bad Request - Invalid…
Andy Wan
  • 1,090
  • 2
  • 11
  • 23
4
votes
2 answers

WCF 400 Bad Request

I created a simple function [OperationContract] [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json)] string Start(); Definition, public String Start() { JavaScriptSerializer serializer…
Tom
  • 208
  • 1
  • 4
  • 11
4
votes
4 answers

Twilio Channel - SMS 60200 Invalid parameter error (400 bad request)

I'm getting a "400 - Bad Request" error with Twilio API, but couldn't find the reason. Here's my request: curl --location --request POST 'https://verify.twilio.com/v2/Services/xxxxxxxxxxxxxx/Verifications' \ --header 'Authorization: Basic xxxxxxxxx'…
PiyushG
  • 41
  • 2
4
votes
1 answer

Why am I getting a 400 bad request error? Using the Django Rest framework as a backend and React as a frontend for my web application

I am developing a simple web application that utilizes the openweathermap api. There is an api call to a view that returns the api data, and displays the temp & description for the weather of the particular city that the user types in. The api call…
MPagan
  • 213
  • 1
  • 3
  • 13
4
votes
2 answers

Spring Boot REST app returns 400 when requested from other docker-compose service by service name

I'm trying to introduce a Spring Boot REST service in our development setup. The development setup is using docker-compose and an API gateway to expose the individual services on the same domain (ie. localhost). When I try to make a HTTP request to…
Morten Olsen
  • 161
  • 1
  • 6
4
votes
2 answers

Jumblr API gives bad request while posting image to Tumblr

What I have I have an image File object trying to post to Tumblr using Jumblr API My problem When I try to post the image I get com.tumblr.jumblr.exceptions.JumblrException: Bad Request Response code :400 My code client = new…
karthik kolanji
  • 2,044
  • 5
  • 20
  • 56
4
votes
1 answer

jira REST API create issue including component

I am trying to create issue using Jira REST API incuding component. I am posting this JSON but I get The remote server returned an error: (400) Bad Request. Issue is:-Without component there is no error, but when component is there issue created.…
babboon
  • 683
  • 3
  • 20
  • 45
4
votes
2 answers

PHP Guzzle Client error response/Bad Request 400 Google OAuth2 Token

Guzzle Request try { $url = 'https://www.googleapis.com/oauth2/v1/tokeninfo?'; $client = new Client(); $request = $client->createRequest('GET', $url); $query = $request->getQuery(); $query['access_token'] = $access_token; …
Edris
  • 925
  • 9
  • 13
4
votes
4 answers

Django and Bad Request (400)

I created new django project; added to my settings.py: DEBUG = False ALLOWED_HOSTS= [ 'localhost', 'my_site.com' ] created app test_view; added hello_world to test_view.views from django.http.response import HttpResponse def…
Anton
  • 2,217
  • 3
  • 21
  • 34
4
votes
1 answer

HTTP 400 error in REST web service during POST with FormParam containing own objects (e.g. enities)

For an ordering process in my REST service I have to send a list of "articles" from client to server. These article objects are of a self-made entity type. I already found out that sending a list of STRING or INTEGER objects does work, sending it…
Jana
  • 266
  • 3
  • 5
  • 18
4
votes
3 answers

Keep Getting Bad Request from HTTP.request in Node.js

I just installed Node.js and perhaps I'm missing something but I'm trying a simple http.request and get nothing but 400 responses. I've tried several hosts with no luck. I installed Node from their site, this didn't work, so I uninstalled and…
Josh R
  • 53
  • 1
  • 1
  • 6
4
votes
4 answers

Twitter POST problems using api 1.1

We've just changed to Twitter api 1.1, and now Tweeting doesn't work & returns an error "The remote server returned an error: (400) Bad Request." Researching on SO about this suggests that it's something to do with authentication, but we are…
SomaMan
  • 4,127
  • 1
  • 34
  • 45