Hi,
I have a working proxy and would like to add register additional handler
that will receive HTTP request from an HTTP client and return response. How
can register this new handler(FooHandler) to the proxy?
func main() {
logger.Log.Infof("Server Name: [%s]", description)
done := m
ppreciated!!
On Wed, Mar 15, 2023 at 6:39 PM Jesper Louis Andersen <
jesper.louis.ander...@gmail.com> wrote:
> On Tue, Mar 14, 2023 at 10:25 AM Van Fury wrote:
>
>> Am developing a server (diameter) which will response with an AVP
>> SIP-Authenticate.
>> In the specif
)
>
> return errors.Wrap(err, "decodeGob")
> }
>
> Op dinsdag 14 maart 2023 om 00:06:31 UTC+1 schreef robert engels:
>
>> Am arbitrary byte can be encoded in 2 HEX characters - only a 2x increase
>> in size not 8x.
>>
>> On Mar 13, 2023, at 2:35 PM,
which then decodes the raw binary back to s1+s2.
On Mon, Mar 13, 2023 at 5:39 PM Van Fury wrote:
> Do you mean encoding should be
> rawdata := fmt.Print("%016d%s%s", len(s1), s1,s2)
> or
> rawdata := fmt.Printf("%016d%s%s", len(s1), s1,s2)
>
>
>
> On Monday,
g.go.dev/strconv#ParseUint
>
> https://go.dev/play/p/qAO9LfLD41D
>
> On Mon, 13 Mar 2023 at 07:24, Van Fury wrote:
>
>>
>> Sorry I did not frame my question properly but what I would like to do is
>> to
>> encode concatenated s1 and s2 into raw binary and then de
ust slice up the decoded
> string based on the lengths. If they are of a variable length, you'll need
> a separator in the input string to later split on when decoded (s3 := s1 +
> ":" + s2 etc)?
>
> On Fri, 10 Mar 2023 at 10:33, Van Fury wrote:
>
>> Hi,
>
Hi,
I have two hexadecimal string values and would like to concatenate the two
strings and
1. encode the result to binary
2. decode the resulting binary back to hexadecimal string
I did the following but I was finding it difficult to decode the result
back. I ignore error check in this c
ng]AuthCtx)
I would like to CtxStarStore would be access globally.
Is there a better way to initialize it.
Thanks for the response.
--
Fury
On Friday, November 19, 2021 at 6:09:04 PM UTC+2 Kurtis Rader wrote:
> On Fri, Nov 19, 2021 at 7:17 AM Van Fury
Hi
I have a map as shown below
var CtxStarStore = make(map[string]AuthCtx)
map[ccc-999401002:{989c48c5-7f9c-4058-80a2-b769ea4675f9 imei-1234010002} bbb
-999401003:{989c48c5-7f9c-4058-80a2-b769ea4675f9 imei-1234010003}]
I would like to delete ccc-999401002 or any key value from the map I tri
ere id=shared_data. You can use a regex for the path
>> with {id} to exclude the "shared_data" match.
>>
>> On Thu, Sep 2, 2021 at 10:13 AM Van Fury wrote:
>>
>>> Hi All,
>>>
>>> I have the following to handler functions, DataSetsGet a
Hi All,
I have the following to handler functions, DataSetsGet and
RetrieveSharedData.
When make request with the URL
https://127.0.0.1:2/nfdm-fdm/v2/shared-data, I get response from
DataSetsGet handler instead of RetrieveSharedData handler function. When I
take the bracket from {id} to id
Hi,
Am using "net/http/httputil" Reverse proxy and would to make HTTPS
forwarding between the two proxy servers. Any help on how to handle HTTPS
between the proxy servers instead of HTTP?
Here are a sample of my code.
Proxy A
func main() {
http.HandleFunc("/", proxyPassA)
server.ListenA
t; (Please excuse the formatting - I'm on my phone).
>
> On Monday, 24 May 2021 at 16:44:34 UTC+1 Van Fury wrote:
>
>> Hi,
>>
>> I have an array of JSON objects as
>>
>> Structs:
>> ```
>> type Data struct {
>> TaiList []Tai `json:&quo
Hi,
I have an array of JSON objects as
Structs:
```
type Data struct {
TaiList []Tai `json:"taiList"`
}
type Tai struct {
PlmnId *PlmnId `json:"plmnId"`
Tac string `json:"tac"`
Nid string `json:"nid"`
}
type PlmnId struct {
Mcc string `json:"mcc"`
Mnc string `json:"mn
Hi,
I would like to implement an HTTP request and response system of this flow
below
client --> A --> B > (request) HTTPserver
client <-- A <-- B < (response) HTTPserver
1. client send HTTP request with any HTTP method (POST,PUT, etc) to A
2. A
t) {
// Decrypt Request here
// ...
url, _ := url.Parse(Server)
proxy := httputil.NewSingleHostReverseProxy(url)
proxy.ServeHTTP(res, req)
}
On Thursday, April 22, 2021 at 4:55:26 PM UTC+3 wilk wrote:
> On 22-04-2021, Van Fury wrote:
> > --=_Part_322_998422299
Hi,
I have to implement an HTTP forwarding proxy in Go which can be used in
production and need advice from Go experts.
Any advice like which Go library is best to use and other things to take
not of when implementing it.
BR
Abraham
--
You received this message because you are subscribed to
"I have two other packages, example.go and user.go" - I mean these files
example.go and user.go are in different directories not the same package,
and have the package names "package example" and "package user". The
main.go is also in different directory with "package main".
On Tuesday, April
HI,
I have the following settings in my REST API program packages:
In "routers.go"
type Route struct {
Namestring
Method string
Pattern string
HandlerFunc http.HandlerFunc
}
var Router = NewRouter()
type Routes []Route
func NewRouter() *mux.Router {
route
Hi,
I have found the problem to the double PUT message being sent and have
solve it.
Thanks for the help.
A lot of lesson learnt from this exercise.
On Sunday, March 21, 2021 at 1:47:07 PM UTC+2 Brian Candler wrote:
> On Sunday, 21 March 2021 at 11:42:37 UTC Brian Candler wrote:
>
>> Also: so
Hi,
Line line 147 of register.go is status code check in the second for loop
but now solved.
if res.StatusCode != http.StatusNoContent {
But i still could not find out why the SendNFInstanceRegistration() message
is send twice even though i have check
the responses here
fmt.Print("sta
status := resp.StatusCode
if status == http.StatusCreated || status == http.StatusOK {
break
}
}
ticker := time.NewTicker(time.Duration(interval) * time.Second)
for _ = range ticker.C {
res, err := SendHeartbeat(cl)
if err != nil {
OK, if I understand you correctly, the outer for loop is not needed and that
there should be two for loops.
the first for loop does step 1,2 and 3 and then "break" out of the loop
when valid response is received
and then set the "interval".
The second for loop start a for _ := range ticker.C loop
Hi Brian,
Thanks for the reply. I intentionally left the error checks out so as to
make the code short.
Also using the Client.Do was an error and its suppose to be
transport.Client.Do.
Also in the main() does other stuff after the PUT and PATCH messages but
does not have any function that is
24 matches
Mail list logo