Comments (4)
@peteguan to answer your specific question:
req, _ := client.NewRequest(Config, "GET", "/path", nil)
req.Header.Add("PAPI-Use-Prefixes", "true")
I am however curious what you're trying to do with PAPI that cannot be done with the papi
package?
from akamaiopen-edgegrid-golang.
It works, thank you. Some cps apis need a header like Content-Type: application/vnd.akamai.cps.certificate-history.v1+json
.
Btw, can I use a proxy when I am creating a new request?
from akamaiopen-edgegrid-golang.
@dshafik I would like to use a proxy in my production environment, how can I set my proxy domain for the requests?
from akamaiopen-edgegrid-golang.
@peteguan you should be able to use the standard Golang methods for setting an http proxy, check out https://stackoverflow.com/a/14663620
In particular, I think in your case you may want the second option, where you set it globally:
proxyUrl, err := url.Parse("http://proxyIp:proxyPort")
http.DefaultTransport = &http.Transport{Proxy: http.ProxyURL(proxyUrl)}
from akamaiopen-edgegrid-golang.
Related Issues (20)
- Go 1.15: conversion from int to string yields a string of one rune HOT 2
- papi-v1 has hard-coded debug logging HOT 1
- rule with empty behavior must be acceptable HOT 1
- Add Network list pkg into client HOT 4
- Updating GTM weights HOT 3
- "signature does not match" error when creating GTM with liveness test HOT 1
- Retrieve Deployments From Enrollment HOT 1
- Passing in a proxy [Question] HOT 1
- how can I increase body size limit for http POST request HOT 3
- why getProperty not returns only property ? HOT 1
- add IP to network-lists gives 422 Unprocessable Request HOT 2
- v2: appsec. UpdateWAFProtection misses request body HOT 5
- [fix] fix code errors in documentation examples
- DXE-2381 V4 of Edgegrid Does Not Parse Host Name HOT 2
- DXE-2672 400 Error - SIEM API HOT 1
- DXE-2723 Network Lists: missing error handling in CreateActivations() HOT 5
- Can you provide a sample of usage, just like the python sample provided on Akamai's official website HOT 2
- DXE-3147 ID attribute is missing in Enrollment struct of CPS package HOT 1
- DXE-3763 Found some missing fields in Create ClientLists API request HOT 1
- GetRecordList does not support pagination HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from akamaiopen-edgegrid-golang.