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%3ERe%3A%20New%20HTTP%20Request%20%3A%20How%20to%20see%20what%20the%20call%20is%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-605455%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ECheck%20the%20scripting%20index%2C%20or%20use%20show%20properties.%20It%20looks%20like%20there%20are%20only%20two%20getters%20of%20interest%20before%20the%20send%3A%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%3ERe%3A%20New%20HTTP%20Request%20%3A%20How%20to%20see%20what%20the%20call%20is%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-606271%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EThanks.%26nbsp%3B%20%26nbsp%3BFrom%20what%20I%20can%20find%20there%20really%20is%20now%20way%20to%20%22show%22%20the%20whole%20string%20for%20the%20request.%26nbsp%3B%20Just%20beginning%20to%20learn%20about%20API%20so%20maybe%20my%20want%20is%20not%20a%20normal%20request%2C%20but%20just%20thought%20it%20would%20be%20good%20to%20debug.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-606294%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20New%20HTTP%20Request%20%3A%20How%20to%20see%20what%20the%20call%20is%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-606294%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EI%20understand%20why%20you%20want%20to%20see%20it.%20It%20would%20make%20a%20good%20wish%20list%20item.%3C%2FP%3E%0A%3CP%3EI%20think%20there%20are%20web%20sites%20that%20will%20echo%20the%20request%20back%20to%20you%2C%20but%20I%20have%20not%20played%20with%20them.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-605441%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ENew%20HTTP%20Request%20%3A%20How%20to%20see%20what%20the%20call%20is%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-605441%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EIs%20there%20a%20way%20to%20show%20what%20the%20call%20will%20be%3F%26nbsp%3B%20I%20would%20like%20to%20debug%20to%20be%20sure%20what%20the%20call%20is%20being%20built%20as...%3C%2FP%3E%3CP%3EE.g.%2C%20Show(MyRequest)%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3EMyRequest%20%3D%20%3CA%20href%3D%22https%3A%2F%2Fmay.api.url%2F%3Fusername%3DXXX1234567%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fmay.api.url%2F%3Fusername%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%3EData%20Access%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