ich an die Saber API mit dem folgenden Code zu verbinden versuche:Fehler (400) Bad Request, wenn zu Saber API
Dim u As String = "https://developer.sabre.com/io-docs/call-api"
' Create the web request
request2 = DirectCast(WebRequest.Create(u), HttpWebRequest)
' Get response
response2 = DirectCast(request2.GetResponse(), HttpWebResponse)
' Get the response stream into a reader
reader2 = New StreamReader(response2.GetResponseStream())
' Console application output
' MsgBox(reader.ReadToEnd())
Response.Write(reader.ReadToEnd())
Jedoch habe ich die folgende Störung erhalte:
Server Error in '/' Application.
The remote server returned an error: (400) Bad Request.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.WebException: The remote server returned an error: (400) Bad Request.
Source Error:
Line 49:
Line 50: ' Get response
Line 51: response2 = DirectCast(request2.GetResponse(), HttpWebResponse)
Line 52:
Line 53: ' Get the response stream into a reader
Kannst du mitteilen, was du zu erreichen versuchst? Denn wenn ich auf die URL gehe: https://developer.sabre.com/io-docs/call-api. -> Ich bekomme: "Es gab ein Problem mit der Einreichung Ihres Formulars." – Wisdoom
ich möchte eine api anrufen den link ich benutze es die verbindung, die es mir gibt, wenn ich die api online –
auch ich versuchte und änderte meine code immer noch das gleiche ergebnis ich will nur eine möglichkeit, die api anrufen es muss nicht sein wie mein Code –