Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -X to okcurl, permitting HEAD requests #522

Merged
merged 1 commit into from
Feb 11, 2014
Merged

Conversation

codefromthecrypt
Copy link

Handy for testing spdy (https://google.ca) and http/2 (https://twitter.com)

Ex.

~/Development/okhttp/okcurl adrian.curl-X ./target/okcurl-2.0.0-SNAPSHOT-jar-with-dependencies.jar -X HEAD -i https://twitter.com
HTTP/1.1 200
OkHttp-Selected-Transport: HTTP-draft-09/2.0
OkHttp-Selected-Protocol: HTTP-draft-09/2.0
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0
content-length: 51304
content-type: text/html;charset=utf-8
date: Tue, 11 Feb 2014 16:59:06 GMT
expires: Tue, 31 Mar 1981 05:00:00 GMT
last-modified: Tue, 11 Feb 2014 16:59:06 GMT
ms: S
pragma: no-cache
server: tfe
set-cookie: REDACTED
status: 200 OK
strict-transport-security: max-age=631138519
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-transaction: 81bc971b3d29aa7f
x-ua-compatible: IE=10,chrome=1
x-xss-protection: 1; mode=block
OkHttp-Sent-Millis: 1392137948438
OkHttp-Received-Millis: 1392137948528
OkHttp-Response-Source: NETWORK 200

cc @JakeWharton @jpinner

JakeWharton added a commit that referenced this pull request Feb 11, 2014
Add -X to okcurl, permitting HEAD requests
@JakeWharton JakeWharton merged commit 12f7e64 into master Feb 11, 2014
@JakeWharton JakeWharton deleted the adrian.curl-X branch February 11, 2014 17:05
@swankjesse
Copy link
Collaborator

LGTM

Off topic: For v2 I think we should replace these:

OkHttp-Selected-Transport: HTTP-draft-09/2.0
OkHttp-Selected-Protocol: HTTP-draft-09/2.0

with this:

okhttp-selected-protocol: HTTP-draft-09/2.0

(Lowercase, only one key)

@codefromthecrypt
Copy link
Author

Sounds good. Should we also accept only this? Or also accept the old one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants