Pesquisar na Comunidade
Mostrando resultados para as tags ''idhttp''.
Encontrado 1 registro
-
Bom dia a todos Estou tentando enviar um JSON utilizando IDHTTP da Aba WEBSERVICES utilizando delphi XE6. Mas quando arquivo é um pouco maior esta retornando a mensagem: HTTP/1.1 413 Request Entity Too Large Sendo que o JSON que estou enviando tem meros 130kb. Alguém já enfrentou esse problema. Segue a configuração utilizada] HTTPClient := TidHTTP.Create;7 HTTPClient.Request.ContentType := 'application/json;odata=light;charset=utf-8;'; HTTPClient.Request.Connection := 'keep-alive'; HTTPClient.Request.CacheControl := 'no-cache'; HTTPClient.BoundPortMax := 5000; HTTPClient.ProtocolVersion := pv1_0; HTTPClient.Request.Accept := 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'; HTTPClient.Request.UserAgent := 'Mozilla/3.0 (compatible; Indy Library)'; HTTPClient.IOHandler := HandlerSSL; JSon := TlkJSONobject.Create; JSonRet := TlkJSONobject.Create; JSon.Add('versao','1'); JSon.Add('chave',Chave); JSon.Add('data','2017-01-01 00:00:00'); i := 0; AssignFile(arq, 'c:\temp\jason.txt'); Rewrite(arq); Writeln(arq,GenerateReadableText(JSon,i)); CloseFile(arq); Resposta := HTTPClient.post('https://api.xxxx.com.br/produtos/listar','c:\temp\jason.txt'); JSonRet := TlkJSON.ParseText(Resposta) as TlkJSONobject; Memo2.Lines.Add(GenerateReadableText(JSonRet,i));