login about faq

Using VFP to access a URL using basic authentication. This returns StatusCode 200

When I look through the LastErrorText, all looks well, until I get to the body, which just has "Response is chunked" in place of the body I was expecting

Does anybody know why ?

Cheers

**Edit: Sorry, could you clarify for me how with Chilkat I could read the data returned by the provider? In the case where it is Chunked ..?

Thanks in advance **

asked Jan 21 '15 at 14:02

vfpuser14's gravatar image

vfpuser14
12

edited Jan 28 '15 at 06:04


The LastErrorText would only contain the first portion of the HTTP response body (up to a certain number of bytes, perhaps 1024), when verbose logging is turned on. If the HTTP response was chunked, then the data will not be in the LastErrorText. (There may also be other cases, such as gzipped responses perhaps.) For more information about chunked HTTP responses, see this: http://en.wikipedia.org/wiki/Chunked_transfer_encoding

link

answered Jan 21 '15 at 19:06

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Sorry, could you clarify for me how with Chilkat I could read the data returned by the provider? In the case where it is Chunked ..?

Thanks in advance

link

answered Jan 27 '15 at 08:26

vfpuser14's gravatar image

vfpuser14
12

The LastErrorText is not the place where you would get the data returned from an HTTP request.

In addition, the underlying complexities of how the data arrives from HTTP server is not something of concern to a client application. A client application using Chilkat would access the response body via the HttpResponse object (if an HttpResponse object is returned), or by the string or bytes returned directly by the method call.

An HTTP server can send responses in very complex ways -- they can be chunked, base64 encoded, compressed, etc. All of the underlying details of un-chunking, decompressing, decoding, etc. are things the application does not have to be concerned about. The point of using an HTTP API is to not have to be involved with the details and complexities of the guts of the HTTP protocol.

link

answered Jan 30 '15 at 10:42

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×7

Asked: Jan 21 '15 at 14:02

Seen: 1,402 times

Last updated: Jan 30 '15 at 10:42

powered by OSQA