Ask Your Question
1

HEAD request in HTTP Client

asked 2018-01-03 21:20:35 -0600

Vivian Yang gravatar image

updated 2018-01-11 17:19:25 -0600

metadaddy gravatar image

How i can get the respond from HEAD request in http Client? I tried the following command in terminal , and get the respond as below.

Command:

curl -i -X HEAD www.google.com

Result

curl -i -X HEAD www.google.com
HTTP/1.1 200 OK
Date: Thu, 04 Jan 2018 03:07:35 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
P3P: CP="This is not a P3P policy! See g.co/p3phelp for more info."
Server: gws
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Set-Cookie: 1P_JAR=2018-01-04-03; expires=Sat, 03-Feb-2018 03:07:35 GMT; path=/; domain=.google.com
Set-Cookie: NID=120=bcEjwtJHEGNz4-xSzwj1IbK5OE2VR71bdQVNglxe5wUtXvFLhVw4vtuvYv-
jmvHXvPX7pf1e7J5YMn4f_1AbAGGEaz4vX6zkx2F4g7taZ_HTAH69kPEeAjhHCMtnMwtm; expires=Fri, 06-Jul-2018 03:07:35 
GMT; path=/; domain=.google.com; HttpOnly
Transfer-Encoding: chunked
Accept-Ranges: none
Vary: Accept-Encoding

I put in the configuration in HTTP Client and trying to check the status in destination, and find out that there is no results been bundled in my destination.

How i can further debug on this? My end goal is to get the "HTTP/1.1 200 OK" C:\fakepath\httpClient.PNG

edit retag flag offensive close merge delete

Comments

What is `https://www.google.com.my/` shown in the screenshot? Doesn't appear to be a valid URL.

jeff gravatar imagejeff ( 2018-01-08 15:07:07 -0600 )edit

I do the amendment to www.google.com but still the same results.

Vivian Yang gravatar imageVivian Yang ( 2018-01-09 00:12:58 -0600 )edit

If you are using SDC 3.0 or later, please turn on logging (via the tab with the same name, in the HTTP stage configuration), and set associated options. That should give a better sense of what's happening since it will show request and response headers/payload.

jeff gravatar imagejeff ( 2018-01-11 16:51:22 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-01-11 17:19:01 -0600

metadaddy gravatar image

This doesn't work, since the HTTP/1.1 200 OK is the HTTP status, rather than the response. By definition, the response of a HEAD request is empty, which is what you're seeing.

Now, the HTTP Client Origin does put the HTTP headers in record header attributes, but the status line is not a header, so it's not there either. In addition, it looks like the origin doesn't create any records if the response is empty.

Please open an issue at https://issues.streamsets.com/ to add HTTP status to the record header in the HTTP Client Origin and Processor, and to create a record with empty contents if the HTTP response is empty.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-01-03 21:20:35 -0600

Seen: 31 times

Last updated: Jan 11