cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
BenchlingVic
Level I

How do I read HTTP response headers?

Hello!

 

I am trying to use JSL (JMP 16.2.0) to read data from an API which contains some relevant data in response headers (in particular, I want to examine the Content-Location header to make a subsequent request).

 

The only documentation I can find around making HTTP requests are examples. In these examples, there is generally a call along the lines of:

request = New HTTP Request(
	URL( url ),
	Method( "GET" ),
	Headers({ "Authorization: Basic " || credentials })
);
data = request << Send();

When I do this, data contains the contents of the HTTP response body, effectively stripping out the response headers I need.

 

Is there any way to send an HTTP request such that I can examine response headers in JSL? (Most helpfully, is there any documentation which explains the HTTP request API fully?)

 

Thanks for your help!

1 ACCEPTED SOLUTION

Accepted Solutions
Craige_Hales
Super User

Re: How do I read HTTP response headers?

Modified from <<GetResponseHeaders in Scripting IndexModified from <<GetResponseHeaders in Scripting Index

Edit: That's less clear than I wanted it to be because <<Send is the message name that is being sent to the object in the variable named request.

Craige

View solution in original post

2 REPLIES 2
Craige_Hales
Super User

Re: How do I read HTTP response headers?

Modified from <<GetResponseHeaders in Scripting IndexModified from <<GetResponseHeaders in Scripting Index

Edit: That's less clear than I wanted it to be because <<Send is the message name that is being sent to the object in the variable named request.

Craige
UersK
Level III

Re: How do I read HTTP response headers?

Thanks!

Recommended Articles