-
Notifications
You must be signed in to change notification settings - Fork 391
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
Added configure request callback function, #25
base: master
Are you sure you want to change the base?
Conversation
this allows caller to modify the body of the request or add authentication to the header of the request. It is optional to use it Signed-off-by: NotZippy <notzippy@gmail.com>
This allows the user to pass in a function to be called before the request is made. The idea is that I will add a standard function to fix the namespace in the xml and the user can simply pass that function to this request. |
@@ -9,9 +9,11 @@ package {{.}} | |||
// Do not modify | |||
// Copyright (c) 2015, Hooklift. All rights reserved. | |||
import ( | |||
"net/http" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like an unused import, are you using gofmt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is required for the operations https://github.com/notzippy/gowsdl/blob/add_soap_header/generator/operations_tmpl.go#L38
I gofmt the soap.go file, appears I have an extra line in this file though..
@notzippy do you have an example of a function fixing a namespace? |
The service
The fixNameSpace function
|
Sorry I did not look at your test cases, likely all broke because I changed the function signature in the soap |
Is there a way of fixing namespaces for everybody altogether? I'm not feeling very strong about adding the |
Yes that was the thought behind the callback originally. There may be other On Wed, Mar 18, 2015, 4:47 PM Camilo Aguilar notifications@github.com
|
No problems, on second thought why not add an extended function to the On Wed, Mar 18, 2015, 5:17 PM Camilo Aguilar notifications@github.com
|
Final thoughts...
|
this allows caller to modify the body of the request or add authentication
to the header of the request. It is optional to use it.
Signed-off-by: NotZippy notzippy@gmail.com