Jump to content

update przez API wynik 400 Bad Request


marcinimag

Recommended Posts

Kiedy próbuje wysłać update na produkcie lub producencie mam błąd 400 Bad Request

 

 

 

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<html><head>

<title>400 Bad Request</title>

</head><body>

<h1>Bad Request</h1>

<p>Your browser sent a request that this server could not understand.<br />

</p>

<hr>

<address>Apache/2.2.16 (Debian) Server at hurt.warior.pl Port 80</address>

</body></html>

 

 

Request

 

 

 

 

<?xml version="1.0" encoding="UTF-8"?><prestashop xmlns:xlink="http://www.w3.org/1999/xlink"><manufacturer><id>3</id><active>1</active><link_rewrite not_filterable="true">olesiejuk</link_rewrite><name>Olesiejuk2</name><date_add>2013-05-28 16:22:41</date_add><date_upd>2013-05-28 16:22:41</date_upd><description><language id="7" xlink:href="http://hurt.warior.pl/api/languages/7"></language></description><short_description><language id="7" xlink:href="http://hurt.warior.pl/api/languages/7"></language></short_description><meta_title><language id="7" xlink:href="http://hurt.warior.pl/api/languages/7"></language></meta_title><meta_description><language id="7" xlink:href="http://hurt.warior.pl/api/languages/7"></language></meta_description><meta_keywords><language id="7" xlink:href="http://hurt.warior.pl/api/languages/7"></language></meta_keywords><associations><addresses node_type="address"/></associations></manufacturer></prestashop>

Link

 

 

PedirPagina = (HttpWebRequest)WebRequest.Create(ConfigurationSettings.AppSettings["Domena"] + "/api/manufacturers");

NetworkCredential nc1 = new NetworkCredential("Password", "");

PedirPagina.Credentials = nc1;

PedirPagina.Method = "PUT";

PedirPagina.ContentType = "text/xml";

PedirPagina.KeepAlive = true;

Edited by marcinimag (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...