-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Feature request Accept property handler #47
Comments
Hello @gknoll9862, What property are you trying to apply? |
Geraldo,
Thank you for replying.
I am working on consuming data from UPS Shipping for tracking packages.
When I send the request, I get this response:
“The 'Accept' header must be modified using the appropriate property or method. Parameter name: name"
The Content Type and the Accept elements are required by the UPS API.
GO
DECLARE @httpMethod nvarchar(max) = 'GET'
DECLARE @url nvarchar(max) = 'https://wwwcie.ups.com/track/v1/details/1Z5338FF0107231059'
DECLARE @headers nvarchar(max) =
'[
{
"Name": "Username",
"Value" :"SomeUserName"
},
{
"Name": "Password",
"Value": "SomePassword"
},
{
"Name": "AccessLicenseNumber",
"Value" :"SomeNumber"
},
{
"Name": "Content-Type",
"Value" :"application/json"
},
{ "Name": "Accept",
"Value": "application/json"
}
]';
DECLARE @JsonBody nvarchar(max) = ''
Declare @ts as table
(
Json_Result nvarchar(max),
ContentType varchar(100),
ServerName varchar(100),
Statuscode varchar(100),
Descripcion varchar(100),
Json_Headers nvarchar(max)
)
DECLARE @i AS INT
INSERT INTO @ts
EXECUTE @i = [dbo].[APICaller_Web_Extended]
@httpMethod
,@url
,@headers
,@JsonBody
SELECT * FROM @ts
Thank you
Greg
From: Geraldo Diaz ***@***.***>
Sent: Monday, April 5, 2021 10:09
To: geral2/SQL-APIConsumer ***@***.***>
Cc: Greg Knoll ***@***.***>; Mention ***@***.***>
Subject: Re: [geral2/SQL-APIConsumer] Feature request Accept property handler (#47)
Hello @gknoll9862<https://github.com/gknoll9862>,
What property are you trying to apply?
Just to confirm if that can be done through the Header cofllection.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#47 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ARLEYYDCV4K4ELYQ2PHBGWLTHHG7VANCNFSM42KOVKBQ>.
|
Did you try calling that API from Postman?... If so could you please show the headers and parametters passed? |
Geraldo,
I am trying that now. But for some reason I am getting an invalid Access License Number message.
Which is not correct because the number I am using is currently in production.
I will get back to you.
Thank you
Greg
From: Geraldo Diaz ***@***.***>
Sent: Monday, April 5, 2021 10:52
To: geral2/SQL-APIConsumer ***@***.***>
Cc: Greg Knoll ***@***.***>; Mention ***@***.***>
Subject: Re: [geral2/SQL-APIConsumer] Feature request Accept property handler (#47)
Did you try calling that API from Postman?... If so could you please show the headers and parametters passed?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#47 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ARLEYYFRS5NAETEYJR56YNLTHHMB5ANCNFSM42KOVKBQ>.
|
Geraldo,
I figured out the issue I was having with PostMan.
Here is the Header code that is sent. I am getting a proper response with the information requested.
There are no other parameters required for this request.
curl --location --request GET 'https://onlinetools.ups.com/track/v1/details/1Zxxxxxx0147529327' \
--header 'username: SomeName' \
--header 'Password: Somepassword' \
--header 'AccessLicenseNumber: SomeNumber' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json'
Thank you
Greg
From: Greg Knoll
Sent: Monday, April 5, 2021 11:39
To: geral2/SQL-APIConsumer ***@***.***>; geral2/SQL-APIConsumer ***@***.***>
Cc: Mention ***@***.***>
Subject: RE: [geral2/SQL-APIConsumer] Feature request Accept property handler (#47)
Geraldo,
I am trying that now. But for some reason I am getting an invalid Access License Number message.
Which is not correct because the number I am using is currently in production.
I will get back to you.
Thank you
Greg
From: Geraldo Diaz ***@***.******@***.***>>
Sent: Monday, April 5, 2021 10:52
To: geral2/SQL-APIConsumer ***@***.******@***.***>>
Cc: Greg Knoll ***@***.******@***.***>>; Mention ***@***.******@***.***>>
Subject: Re: [geral2/SQL-APIConsumer] Feature request Accept property handler (#47)
Did you try calling that API from Postman?... If so could you please show the headers and parametters passed?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#47 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ARLEYYFRS5NAETEYJR56YNLTHHMB5ANCNFSM42KOVKBQ>.
|
Got it, I'll be uploading a new version which assign that Accept value from headers to the httprequest. |
Geraldo,
Thank you so much!
You have no idea how useful this is! But then maybe you do😊😊.
Thank you
Greg
From: Geraldo Diaz ***@***.***>
Sent: Monday, April 5, 2021 13:23
To: geral2/SQL-APIConsumer ***@***.***>
Cc: Greg Knoll ***@***.***>; Mention ***@***.***>
Subject: Re: [geral2/SQL-APIConsumer] Feature request Accept property handler (#47)
Got it, I'll be uploading a new version which assign that Accept value from headers to the httprequest.
In addition to a table value function object which returns the result set without needing that table variable be declared.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#47 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ARLEYYA4UCJLIR7UCGTB5UTTHH5YPANCNFSM42KOVKBQ>.
|
Curious when this new version will be uploaded. I'm hitting the same problem. Thanks for such a great tool! |
Hello there, Sorry for the delay, This fix was already coded, I just need to test it and upload it. I haven't had much time these days. But you could help testing it. I can upload a new branch. I added all the request properties below;
|
Thank you!
I will test this asap and get back to you!
Thank you
Greg Knoll
IT Systems Administrator
O: 763-551-4341
E: ***@***.******@***.***>
***@***.***
15300 25th Avenue North, Suite 600
Minneapolis, MN 55447
The information contained in this electronic mail message is confidential information intended only for the use of the individual or entity named above, and may be privileged. If the reader of this message is not the intended recipient or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.
From: Geraldo Diaz ***@***.***>
Sent: Tuesday, August 31, 2021 08:22
To: geral2/SQL-APIConsumer ***@***.***>
Cc: Greg Knoll ***@***.***>; Mention ***@***.***>
Subject: Re: [geral2/SQL-APIConsumer] Feature request Accept property handler (#47)
Hello there,
Sorry for the delay, This fix was already coded, I just need to test it and upload it. I haven't had much time these days.
But you could help testing it. I can upload a new branch. I added all the request properties below;
* "Host"
* "Referer"
* "MediaType"
* "TransferEncoding"
* "Accept"
* "Connection"
* "ConnectionGroupName"
* "Expect"
* "ContentLength"
* "Pipelined"
* "AllowAutoRedirect"
* "KeepAlive"
* "ReadWriteTimeout"
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#47 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ARLEYYEHRFMXZWZM2OA6NY3T7TJQLANCNFSM42KOVKBQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Greetings Mr. Diaz, In your last post you mentioned you where going to start a new branch and upload the new code to be tested. I would very much like to start testing some of this for you. Thank you |
Hello @gknoll9862, I forgot to mention but I uploaded a version with this change. Could you please take a look on brank release_v2.4 |
Could you please add a handler to apply the Accept values to the HttpWebRequest.Accept property?
Thank you
Greg
The text was updated successfully, but these errors were encountered: