cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-605455%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E6%96%B0%E7%9A%84%20HTTP%20%E8%AB%8B%E6%B1%82%EF%BC%9A%E5%A6%82%E4%BD%95%E6%9F%A5%E7%9C%8B%E8%AA%BF%E7%94%A8%E7%9A%84%E5%85%A7%E5%AE%B9%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-605455%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E6%AA%A2%E6%9F%A5%E8%85%B3%E6%9C%AC%E7%B4%A2%E5%BC%95%EF%BC%8C%E6%88%96%E4%BD%BF%E7%94%A8%E9%A1%AF%E7%A4%BA%E5%B1%AC%E6%80%A7%E3%80%82%20%E7%9C%8B%E8%B5%B7%E4%BE%86%E5%9C%A8%E7%99%BC%E9%80%81%E4%B9%8B%E5%89%8D%E5%8F%AA%E6%9C%89%E5%85%A9%E5%80%8B%E6%84%9F%E8%88%88%E8%B6%A3%E7%9A%84%E5%90%B8%E6%B0%A3%E5%8A%91%EF%BC%9A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EmyAPIURL%20%3D%20%22https%3A%2F%2Fmy.api.url%2F%22%3B%0A%0AmyRequest%20%3D%20New%20HTTP%20Request(%0A%20URL(myAPIURL)%2C%0A%20Method(%22GET%22)%2C%0A%20Headers(%22username%3A%20XXX1234567%22)%3B%0A)%3B%0A%0Ashowproperties(myRequest)%3B%0A%0AmyRequest%26lt%3B%3CGET%20last%3D%22%22%20url%3D%22%22%3E%3C%2FGET%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-606271%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E6%96%B0%E7%9A%84%20HTTP%20%E8%AB%8B%E6%B1%82%EF%BC%9A%E5%A6%82%E4%BD%95%E6%9F%A5%E7%9C%8B%E8%AA%BF%E7%94%A8%E7%9A%84%E5%85%A7%E5%AE%B9%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-606271%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E8%AC%9D%E8%AC%9D%E3%80%82%E6%93%9A%E6%88%91%E6%89%80%E7%9F%A5%EF%BC%8C%E7%8F%BE%E5%9C%A8%E7%A2%BA%E5%AF%A6%E6%9C%89%E8%BE%A6%E6%B3%95%E2%80%9C%E9%A1%AF%E7%A4%BA%E2%80%9D%E8%AB%8B%E6%B1%82%E7%9A%84%E6%95%B4%E5%80%8B%E5%AD%97%E7%AC%A6%E4%B8%B2%E3%80%82%E5%89%9B%E9%96%8B%E5%A7%8B%E5%AD%B8%E7%BF%92API%E6%89%80%E4%BB%A5%E5%8F%AF%E8%83%BD%E6%88%91%E6%83%B3%E8%A6%81%E7%9A%84%E4%B8%8D%E6%98%AF%E4%B8%80%E5%80%8B%E6%AD%A3%E5%B8%B8%E7%9A%84%E8%AB%8B%E6%B1%82%EF%BC%8C%E5%8F%AA%E6%98%AF%E8%A6%BA%E5%BE%97%E8%AA%BF%E8%A9%A6%E4%B8%80%E4%B8%8B%E6%9C%83%E5%BE%88%E5%A5%BD%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-606294%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E6%96%B0%E7%9A%84%20HTTP%20%E8%AB%8B%E6%B1%82%EF%BC%9A%E5%A6%82%E4%BD%95%E6%9F%A5%E7%9C%8B%E8%AA%BF%E7%94%A8%E7%9A%84%E5%85%A7%E5%AE%B9%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-606294%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E6%88%91%E6%98%8E%E7%99%BD%E4%BD%A0%E7%82%BA%E4%BB%80%E9%BA%BC%E6%83%B3%E7%9C%8B%E5%AE%83%E3%80%82%20%E5%AE%83%E5%B0%87%E6%88%90%E7%82%BA%E4%B8%80%E5%80%8B%E5%BE%88%E5%A5%BD%E7%9A%84%E9%A1%98%E6%9C%9B%E6%B8%85%E5%96%AE%E9%A0%85%E7%9B%AE%E3%80%82%3C%2FP%3E%0A%3CP%3E%E6%88%91%E8%AA%8D%E7%82%BA%E6%9C%89%E4%BA%9B%E7%B6%B2%E7%AB%99%E6%9C%83%E5%B0%87%E8%AB%8B%E6%B1%82%E5%9B%9E%E9%A1%AF%E7%B5%A6%E6%82%A8%EF%BC%8C%E4%BD%86%E6%88%91%E9%82%84%E6%B2%92%E6%9C%89%E7%8E%A9%E9%81%8E%E5%AE%83%E5%80%91%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-605441%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E6%96%B0%E7%9A%84%20HTTP%20%E8%AB%8B%E6%B1%82%EF%BC%9A%E5%A6%82%E4%BD%95%E6%9F%A5%E7%9C%8B%E8%AA%BF%E7%94%A8%E7%9A%84%E5%85%A7%E5%AE%B9%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-605441%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E6%9C%89%E6%B2%92%E6%9C%89%E8%BE%A6%E6%B3%95%E9%A1%AF%E7%A4%BA%E9%80%9A%E8%A9%B1%E5%85%A7%E5%AE%B9%EF%BC%9F%E6%88%91%E6%83%B3%E8%AA%BF%E8%A9%A6%E4%BB%A5%E7%A2%BA%E5%AE%9A%E8%AA%BF%E7%94%A8%E6%AD%A3%E5%9C%A8%E6%A7%8B%E5%BB%BA%E7%82%BA......%3C%2FP%3E%3CP%3E%E4%BE%8B%E5%A6%82%EF%BC%8C%20%E9%A1%AF%E7%A4%BA%EF%BC%88%E6%88%91%E7%9A%84%E8%AB%8B%E6%B1%82%EF%BC%89%3C%2FP%3E%3CP%3E%E6%88%91%E7%9A%84%E8%AB%8B%E6%B1%82%20%3D%3CA%20href%3D%22https%3A%2F%2Fmay.api.url%2F%3Fusername%3DXXX1234567%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%20https%3A%2F%2Fmay.api.url%2F%3F%E7%94%A8%E6%88%B6%E5%90%8D%3DXXX1234567%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EmyAPIURL%20%3D%20%22https%3A%2F%2Fmy.api.url%2F%22%3B%0A%0AmyRequest%20%3D%20New%20HTTP%20Request(%0A%20URL(myAPIURL)%2C%0A%20Method(%22GET%22)%2C%0A%20Headers(%22username%3A%20XXX1234567%22)%3B%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-605441%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3E%E6%95%B8%E6%93%9A%E5%AD%98%E5%8F%96%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Choose Language Hide Translation Bar
justvince
Level III

New HTTP Request : How to see what the call is

Is there a way to show what the call will be?  I would like to debug to be sure what the call is being built as...

E.g., Show(MyRequest)  

MyRequest = https://may.api.url/?username=XXX1234567

 

 

myAPIURL = "https://my.api.url/";

myRequest = New HTTP Request(
	URL(myAPIURL),
	Method("GET"),
	Headers("username: XXX1234567");
);

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Craige_Hales
Super User

Re: New HTTP Request : How to see what the call is

Check the scripting index, or use show properties. It looks like there are only two getters of interest before the send:

myAPIURL = "https://my.api.url/";

myRequest = New HTTP Request(
	URL(myAPIURL),
	Method("GET"),
	Headers("username: XXX1234567");
);

showproperties(myRequest);

myRequest<<get last url; // "https://my.api.url/"
myRequest<<get method; // "GET"
Craige

View solution in original post

justvince
Level III

Re: New HTTP Request : How to see what the call is

Thanks.   From what I can find there really is now way to "show" the whole string for the request.  Just beginning to learn about API so maybe my want is not a normal request, but just thought it would be good to debug.

View solution in original post

3 REPLIES 3
Craige_Hales
Super User

Re: New HTTP Request : How to see what the call is

Check the scripting index, or use show properties. It looks like there are only two getters of interest before the send:

myAPIURL = "https://my.api.url/";

myRequest = New HTTP Request(
	URL(myAPIURL),
	Method("GET"),
	Headers("username: XXX1234567");
);

showproperties(myRequest);

myRequest<<get last url; // "https://my.api.url/"
myRequest<<get method; // "GET"
Craige
justvince
Level III

Re: New HTTP Request : How to see what the call is

Thanks.   From what I can find there really is now way to "show" the whole string for the request.  Just beginning to learn about API so maybe my want is not a normal request, but just thought it would be good to debug.

Craige_Hales
Super User

Re: New HTTP Request : How to see what the call is

I understand why you want to see it. It would make a good wish list item.

I think there are web sites that will echo the request back to you, but I have not played with them.

Craige

Recommended Articles